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!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register 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]))
)
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 53 | |
| 48 | |
| 35 | |
| 14 | |
| 14 |
| User | Count |
|---|---|
| 93 | |
| 79 | |
| 37 | |
| 27 | |
| 25 |