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!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Self-taught PowerBi novice here 🙂
I'm trying to create a combined line - stacked column chart, showing the absolute number of records within a specific category over time (date from a DIM table on the x-axis). Additionally, I use a tooltip showing the percentage of the segment to the total of the column.
This is the DAX-code I use for the tooltip:
Because of the combination of lines and columns, it seemed I couldn't change the order of the segments in the column, so I created a second table to define the order of the segments in the stacked column:
In my fact table (Table1), I created the following column:
And I created a relation between the Table1 [category] and the SegmentSort[Segment].
When I use the tooltip on my graph, it works perfectly. Once I define that my column Table1[category] should be sorted based on Table1[SegmentOrder], all percentages become 100%.
What is the reason for this and how can I solve this?
Thanks in advance!
Solved! Go to Solution.
Hi @Anoniem9,
try the following:
Percentage =
DIVIDE(
COUNTROWS('Table1'),
CALCULATE(COUNTROWS('Table1'), ALLSELECTED('Table1'[category], 'Table1'[SegmentOrder]))
)
HI @Anoniem9, I'm glad you found a solution! We're here in the community to support each other.
Regards,
Rufyda Rahma | MIE
Tooltip Measure:
Percentage =
DIVIDE(
COUNTROWS('Table1'),
CALCULATE(
COUNTROWS('Table1'),
ALLEXCEPT('Table1', SegmentSort[Order])
)
)
If this answer helped, please click 👍 or Accept as Solution.
-Kedar
LinkedIn: https://www.linkedin.com/in/kedar-pande
Hi @Anoniem9,
try the following:
Percentage =
DIVIDE(
COUNTROWS('Table1'),
CALCULATE(COUNTROWS('Table1'), ALLSELECTED('Table1'[category], 'Table1'[SegmentOrder]))
)
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 58 | |
| 52 | |
| 40 | |
| 17 | |
| 16 |
| User | Count |
|---|---|
| 111 | |
| 109 | |
| 40 | |
| 33 | |
| 26 |