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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

View discussion in a popup

Replying to:
v-ssriganesh
Community Support

Hi NelsonPay,
Thank you for reaching out to the Microsoft fabric community forum.

Iโ€™ve reproduced your scenario in Power BI Desktop using sample data with Product โ†’ Country hierarchy and the Oversell >125% column. Initially, I observed the same issue you described. the Product-level subtotal was showing 0 even though some Countries had positive values.

To resolve this, you need to adjust the DAX measure so that the โ€œpositive checkโ€ happens at the Country level, and then these results roll up correctly to the Product subtotal.

Hereโ€™s the corrected measure:

Total Positives =

SUMX (

    VALUES ( 'Total Sells'[Country] ),

    VAR total_positives =

        CALCULATE ( SUM ( 'Total Sells'[Oversell >125%] ) )

    RETURN IF ( total_positives > 0, total_positives, 0 )

)

For your reference, Iโ€™ve attached a sample .pbix file.

 
Best regards,
Ganesh Singamshetty.