Forum Discussion
Custom horizontal barchart
- 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 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.
Works like a charm ! Many thanks bhanu_gautam ! You rock, and you allowed me to improve my understanding of Dax !
- Jay200241 year ago
Helper I
Also a nice trick to improve UI