Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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.
User | Count |
---|---|
125 | |
106 | |
99 | |
63 | |
62 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |