Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I can't seem to figure this out, yet it feels so elementary. I have a table in my BI Power Query, and in one column titled "Type" the text values will be one of 3 items: Demand, Supply, or On Hand. I have another column that is a whole number titled "Quantity". I would like to create 3 custom columns, one each for Demand, Supply, and On Hand, where if "Type" = "Demand", then "Quantity", else 0, and so on for the other two. I have this in Excel, just can't figure out the DAX to do it in BI. Sample from Excel below, again I am trying to create conditional columns such as the ones highlighted green in BI. Thanks for your help!
Solved! Go to Solution.
Use following formulas in DAX for custom columns
Demand = IF([Type]="Demand",[Quantity],0)
Supply = IF([Type]="Supply",[Quantity],0)
On Hand = IF([Type]="On Hand",[Quantity],0)
Use following formulas in DAX for custom columns
Demand = IF([Type]="Demand",[Quantity],0)
Supply = IF([Type]="Supply",[Quantity],0)
On Hand = IF([Type]="On Hand",[Quantity],0)