Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi,
I would like to merge a table in power query only if a parameter is met, if not it doesnt load.
Something like;
If LeadTimeCriteria = "Contracted" then
// Add contracted table and columns
AddContractedTimes = Table.NestedJoin(LeadTimeEventPlannedB,{"POL", "POD", "Transport Mode", "Carrier"},#"Contracted Transits",{"POL", "POD", "Load Type", "Carrier"},"Contracted Transits",JoinKind.LeftOuter), SetupContractedTransits = Table.ExpandTableColumn(AddContractedTimes, "Contracted Transits", {"Carrier Choice", "Transit Time port - port (Days)", "Valid From", "Valid To"}, {"Contracted Transits.Carrier Choice", "Contracted Transits.Transit Time port - port (Days)", "Contracted Transits.Valid From", "Contracted Transits.Valid To"}), AdjustColumns = Table.RenameColumns(SetupContractedTransits,{{"Contracted Transits.Carrier Choice", "Lead Time Contracted Carrier Choice"}, {"Contracted Transits.Transit Time port - port (Days)", "Lead Time Contracted P2P Transit Time"}, {"Contracted Transits.Valid From", "Lead Time Contracted Valid From"}, {"Contracted Transits.Valid To", "Lead Time Contracted Valid To"}}),
Else
// do nothing
Is it possible to use the if function in this way similar in VBA?
Thanks in advance
Solved! Go to Solution.
Hi @Jeffery24 ,
Power Query if function can only handle data rather than the control process. As a result, we cannot use it in your scenario.
Best Regards,
Teige
Hi @Jeffery24 ,
Power Query if function can only handle data rather than the control process. As a result, we cannot use it in your scenario.
Best Regards,
Teige
Hi Teige,
Many thanks for your reply. I thought that might be the case I just wanted to check.
User | Count |
---|---|
98 | |
90 | |
82 | |
73 | |
67 |
User | Count |
---|---|
115 | |
102 | |
98 | |
71 | |
67 |