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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
DanielKunc
Frequent Visitor

Measure in Total Row

Hi,

I'm creating report with Table where are several measures but Total Row shows incorrect numbers ( Measure result )

I'm using this measure:

 

Still to be invoiced ACY = IF( [Invoiced Line Amount ACY] = 0; [Line amount excl. VAT ACY] - [GL_Amount];[Invoiced Line Amount ACY Remaining])

 

PowerBI.png

 
 
 
 
 

 

 On row level it works perfectly, but it fails in Total row. In Column Still to be Invoiced ACY Celkem (Total) should be 169 784 (475 438 - 305 653), but it shows 172 104 (based on following measure). 

Could you please kindly advise how to solve this?

 

Thank You

BR, Daniel

 

 

 

 

4 REPLIES 4
v-zhenbw-msft
Community Support
Community Support

Hi @DanielKunc ,

 

Maybe the condition of IF function is wrong, you can try measure like this,

 

New Measure = 
IF([Invoiced Line Amount ACY Remaining]=0,[Invoiced Line Amount ACY Remaining],[Line amount excl. VAT ACY]-[GL_Amount])

 

The result like this,

 

measure 1.jpg

 

If it doesn’t meet your requirement, could you please provide a mockup sample  based on fake data or describe the fields of each tables and the relations between tables simply?

 

It will be helpful if you can show us the exact expected result based on the tables. Please upload your files to OneDrive For Business and share the link here.

 

Please don't contain any Confidential Information or Real data in your reply.

 

BTW, pbix as attached.

 

Best regards,

 

Community Support Team _ zhenbw

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-zhenbw-msft ,

sorry for late reply and thank you for your reply.

I've prepared PBIX file where are simplified columns (I'm using Measures with the same Measure names). The issue is with Grand Total of the Still to be invoiced ACY measure:

 

Still to be invoiced ACY = 
VAR LineAmountGL = ([Line amount ACY] - [GL_Amount])
VAR DivideLineAmountGL = ABS(DIVIDE([Line amount ACY],[GL_Amount])-1)
RETURN
IF(DivideLineAmountGL>0.02,[Invoiced Line Amount ACY Remaining],
IF([Invoiced Line Amount ACY] = 0, LineAmountGL,[Invoiced Line Amount ACY Remaining]))

 

The Grand total shows values based on this "formula"

PowerBI_Mockup_Shipment_PowerBI.png

And I would need to get sum of each row of this "formula" as it's in Excel Pivot table

 

Thank You very much

DAniel

amitchandak
Super User
Super User

@DanielKunc , Row context issue. Try like

Sumx(summarize(Table, table[parent_project_id], "_1",[Still to be invoiced ACY]),[_1])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak Thank You for your promt reply but it unfortunately doesn't work.

Parent Project ID is from [Projects], "sublevel" is from [Contracts detail]. Each measure used in this PivotTable is in [Contracts detail] and they are similar to each other, for example:

Line Amount excl. VAT ACY = SUMX('Contracts Detail';'Contracts Detail'[Line Amount Excl. VAT (REP) after Discount])

They work fine on row and total level. But Still to be invoiced ACY does not work on Total level.

Thank You

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.