Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
EAPCGF
Frequent Visitor

DAX for percent of stacked column (only column not GT) with date hierarchy

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.

What DAX can I use to get percent of series in each column? ie numerator - series, denominator total for both series in that month/quarter/year.
or is there another way to do this?

Thanks

 

Percent Stream2 =
DIVIDE(
    DISTINCTCOUNT(Table1[ID] ),
    CALCULATE(
        DISTINCTCOUNT(Table1[ID] ),
        ALLSELECTED()
    )
)

DAX Q.png

2 ACCEPTED SOLUTIONS
DataInsights
Super User
Super User

@EAPCGF,

 

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] )
    )
)

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

Perfect! Thank you 🙂

View solution in original post

2 REPLIES 2
DataInsights
Super User
Super User

@EAPCGF,

 

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] )
    )
)

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Perfect! Thank you 🙂

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.