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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply

Help me the with DAX Measure ?..

Dear PBI Experts
Good Morning 
I have a Situation Below, please help me with the Solution.
Thanks in advance!..

ravirayala4252_1-1691044497725.png

 

 



1 REPLY 1

Hello All
For the above situation i used the following measure to calculate actual Hourr. But results are incorrect, by taking this as a referance any help can i get.

Combined Actual Hours Measure =
VAR MatchingWorkOrders =
    INTERSECT(
        VALUES('Firm Hours'[WO] ),
        VALUES(sapexport_2022[Order #])
    )
VAR MatchingMaterialIDs =
    CALCULATETABLE(
        VALUES('Firm Hours'[Material ID]),
        NOT sapexport_2022[Order #] IN VALUES('Firm Hours'[WO]),
        'Firm Hours'[Material ID] IN VALUES(sapexport_2022[Material ID])
    )

RETURN
    SWITCH(MAX('Firm Hours'[Category]),
        "Firm", CALCULATE(SUM(sapexport_2022[Total Run Time]), sapexport_2022[Order #] IN MatchingWorkOrders),
        "Firm Plan", CALCULATE(SUM(sapexport_2022[Total Run Time]), sapexport_2022[Material ID] IN MatchingMaterialIDs),
       "Planned", CALCULATE(SUM(sapexport_2022[Total Run Time]), NOT sapexport_2022[Material ID] IN MatchingMaterialIDs),
        BLANK()
    )

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.