Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
I would like to create a stacked bar chart visualization that takes different values of Commodity( Electric, Natual Gas, Steam, etc). However all the values are in a different unit and I would like multiple specific constant to each column so that they are in the same unit.
I am able to multiply all columns by a constant by using this DAX expression:
In this case, the constanst is 3.
However, each of these column is to be multiplied with a different constant to normalize the values.
Is there a way to achieve this?
Solved! Go to Solution.
Hi,
Does this measure work
=if(max(commodities[Commodity])="Electric",[Bill_line_item_values]*3,if(max(commodities[Commodity])="Natural Gas",[Bill_line_item_values]*2,[Bill_line_item_values]*5))
I have assumed that Bill_line_item_values is an explicit measure you have written.
Hi,
Does this measure work
=if(max(commodities[Commodity])="Electric",[Bill_line_item_values]*3,if(max(commodities[Commodity])="Natural Gas",[Bill_line_item_values]*2,[Bill_line_item_values]*5))
I have assumed that Bill_line_item_values is an explicit measure you have written.
Thanks for your comment. The DAX expression gives out a syntax error.
So I tried to rectify this but this says that the max function can only accept columns as an argument.
You are welcome. I did not close the bracket of the Max function. I have edited my original post. Please copy and paste the formula again.
The above DAX worked. Thank you.
Hi,
I cannot visualise the problem. Share the download link of the PBI file and show the problem clearly.