February 1, 2019
hi Guys,
i added boolean parameter from table like here:
SourceTable:
TopologyTierNumber
Topo2 | Tier2 | 1 |
Topo2 | Tier2 | 2 |
Topo2 | Tier2 | 2 |
Boolean table:
TopologyTierIsIncluded
Topo1 | Tier1 | TRUE |
And now i want to append 2 tables based on condition th get result (If TRUE):
TopologyTierNumber
Topo2 | Tier2 | 1 |
Topo2 | Tier2 | 2 |
Topo1 | Tier1 |
If FALSE:
TopologyTierNumber
Topo2 | Tier2 | 1 |
Topo2 | Tier2 | 2 |
Can you please advice how M language should look like for it?:
Best,
Jacek
Power Query
Power Pivot
Xtreme Pivot Tables
Excel for Decision Making
Excel for Finance
Excel Analysis Toolpak
Power BI
Excel
Word
Outlook
Excel Expert
Excel Customer Service
PowerPoint
November 8, 2013
let
Source = Excel.CurrentWorkbook(){[Name="SourceTable"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Topology", type text}, {"Tier", type text}, {"Number", Int64.Type}}),
#"Removed Duplicates" = Table.Distinct(#"Changed Type"),
Custom1 = if IsAppended[IsIncluded]{0}=true then Table.Combine({#"Removed Duplicates",IsAppended}) else #"Removed Duplicates",
#"Removed Columns" = Table.RemoveColumns(Custom1,{"IsIncluded"})
in
#"Removed Columns"
IsAppended should be:
let
Source = Excel.CurrentWorkbook(){[Name="IsAppended"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"IsIncluded", type logical}})
in
#"Changed Type"
Answers Post
1 Guest(s)