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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
mincii
New Member

Grand Sum Total is "error" and doesnt sum up

Dear Community

 

I have ridiciouls problem, which I couldnt found out, what exactly the Problem is: I have a calculation as shown below in the picture:

mincii_0-1688458824493.png

 

Here are the Measures:

Betrag = SUMX(Tankungen, Tankungen[Liter] * RELATED(Preis[Preis CHF/L]))
Betrag m Rabatt = IF([Kundengruppe] = "C", SUMX(Tankungen, Tankungen[Liter] * RELATED(Preis[Preis CHF/L])),IF([Kundengruppe] IN {"A","B","D"},SUMX(Tankungen, Tankungen[Liter] * (RELATED(Preis[Preis CHF/L])-0.03)), "Fehler"))

I know that "Fehler" comes from the "Fehler" of the measure.  When I am filtering everything looks great:

mincii_1-1688459192439.png

Does anybody know what I did wrong?

 

Thanks in advance. 

 

BR

 

 

 

5 REPLIES 5
mlsx4
Memorable Member
Memorable Member

Take into account that grand total doesn't meet this condition

[Kundengruppe] IN {"A","B","D"}

therefore, it will return "Fehler"

That means I can't fix this? Or what should I do instead?

mlsx4
Memorable Member
Memorable Member

What do you want to show in the grand total?

I want to show the sum grand total of all 4 (A,B,C,D) even If I have the exeption there with "C".

mlsx4
Memorable Member
Memorable Member

The only thing that cames to my mind is to generate another measure like this:

Betrag m Rabatt2= 
var A= CALCULATE( [Betrag m Rabatt], [Kundengruppe]="A")
var B= CALCULATE( [Betrag m Rabatt], [Kundengruppe]="B")
var C= CALCULATE( [Betrag m Rabatt], [Kundengruppe]="C")
var D= CALCULATE( [Betrag m Rabatt], [Kundengruppe]="D")

return IF([Kundengruppe]="",A+B+C+D, [Betrag m Rabatt])

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.