Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I have a stacked column chart with two categories in the series/legend (under 65 and over 65). It shows a count of people in each of the two series.
I also have a date heirarchy on the x axis.
I need the series to display data labels showing count AND percent of total for each column (not percent of grand total).
I have created a measure using DAX to calculate the percent of total and added this to the detail section of the data labels. This works well for a single stacked column, but when I add the date heirarchy it shows percent of grand total, not percent of each column.
Thanks
Solved! Go to Solution.
This solution assumes that your model has a date table (best practice). The concept is to keep the Month filter context while clearing all other filters originating within the visual.
Percent Stream2 =
DIVIDE (
DISTINCTCOUNT ( Table1[ID] ),
CALCULATE (
DISTINCTCOUNT ( Table1[ID] ),
ALLSELECTED (),
VALUES ( 'Date'[Month] )
)
)
Proud to be a Super User!
This solution assumes that your model has a date table (best practice). The concept is to keep the Month filter context while clearing all other filters originating within the visual.
Percent Stream2 =
DIVIDE (
DISTINCTCOUNT ( Table1[ID] ),
CALCULATE (
DISTINCTCOUNT ( Table1[ID] ),
ALLSELECTED (),
VALUES ( 'Date'[Month] )
)
)
Proud to be a Super User!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
17 | |
10 | |
10 | |
8 | |
6 |
User | Count |
---|---|
20 | |
18 | |
16 | |
13 | |
10 |