Forum Discussion
Jay20024
Helper I
1 year agoCustom horizontal barchart
Hi, For esthetic purpose, I like to create a horizontal stack barchart with values, that looks like a 100% stacked barchart. So i need to calculate the most expensive category, substracting the res...
- 1 year ago
Jay20024 Create a new measure to calculate the total cost for each category.
Create another measure to calculate the GAP.TotalCost = SUM('YourTable'[Cost])
MaxCost = CALCULATE(MAXX(ALL('YourTable'[Category]), [TotalCost]))
GAP = [MaxCost] - [TotalCost]
Add a stacked bar chart to your report.
Drag the Category field to the Axis.
Drag the TotalCost measure to the Values.
Drag the GAP measure to the Values.
Jay20024
Helper I
1 year agoWorks like a charm ! Many thanks bhanu_gautam ! You rock, and you allowed me to improve my understanding of Dax !
Jay20024
Helper I
1 year agoAlso a nice trick to improve UI