Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |