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

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.

Reply
zabman
Frequent Visitor

Stacked bar chart with dax expression

Hi,

 

I have a (for me) complex DAX expression showing the average hours taken to move a work item out of 'new' status.

I want to have a bar chart that shows the number of work orders that are above 48 hours, and the number that are below (stacked to 100%)
How can I achieve this?

1 REPLY 1
rbriga
Impactful Individual
Impactful Individual

Assuming you have a fact table named 'Fact Orders', a field named "Order Number" and the measure [

Average Hours]:

Assuming you have a fact table named 'Fact Orders', a field named "Order Number" and the measure [

Average Hours]:
Orders over 48 Hours = 
COUNTROWS(
    FILTER(VALUES('Fact Orders'[Order Number]),
    [Average Hours]>48
    )
)

Orders Within 48 Hours = 
COUNTROWS(
    FILTER(VALUES('Fact Orders'[Order Number]),
    [Average Hours]<=48
    )
)
Place those two in a 100% stacked bar chart and you should be good to go.


Place those two in a 100% stacked bar chart and you should be good to go.

-------------------------
Data analyst by day, hockey goalie by night.
Did I help? Then please hit that "kudos" or "accept as a solution" button!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.