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
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
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.

Top Solution Authors
Top Kudoed Authors