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.

Reply
JohanData
Resolver I
Resolver I

Orderbook value calculated in hierarchy

Hi folks,

 

I'm struggling with how to calculate the 2 orderbook versions in Power BI. Thanks in advance. See screenshot below. Question PBI Community.JPG

2 ACCEPTED SOLUTIONS
v-juanli-msft
Community Support
Community Support

Hi @JohanData 

Test with this table

cate mainprojectnr projectnr budjet actual
parent 123 123 0 0
child1 123 123.001 60 120
child2 123 123.002 30 10

Create measure

Measure_maxvalue = MAX(SUM(Table1[budjet])-SUM(Table1[actual]),0)


version1 =
IF (
    HASONEVALUE ( Table1[cate] ),
    BLANK (),
    MAX (
        CALCULATE ( SUM ( Table1[budjet] ), ALL ( Table1 ) )
            - CALCULATE ( SUM ( Table1[actual] ), ALL ( Table1 ) ),
        0
    )
)


version2 = IF(HASONEVALUE(Table1[cate]),[Measure_maxvalue],SUMX(ALL(Table1),[Measure_maxvalue]))

5.png6.png

Best Regards
Maggie

 

Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-juanli-msft
Community Support
Community Support

Hi @JohanData 

Test with this table

cate mainprojectnr projectnr budjet actual
parent 123 123 0 0
child1 123 123.001 60 120
child2 123 123.002 30 10

Create measure

Measure_maxvalue = MAX(SUM(Table1[budjet])-SUM(Table1[actual]),0)


version1 =
IF (
    HASONEVALUE ( Table1[cate] ),
    BLANK (),
    MAX (
        CALCULATE ( SUM ( Table1[budjet] ), ALL ( Table1 ) )
            - CALCULATE ( SUM ( Table1[actual] ), ALL ( Table1 ) ),
        0
    )
)


version2 = IF(HASONEVALUE(Table1[cate]),[Measure_maxvalue],SUMX(ALL(Table1),[Measure_maxvalue]))

5.png6.png

Best Regards
Maggie

 

Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

thanks 🙂

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.