cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Broeselchen
Helper III
Helper III

Summe auf Zeilenbasis

Wie schaffe ich es, dass die Summe am Ende wirklich die Summe der Spalte ist und nicht zeilenweise berechnet wird?

Broeselchen_0-1668591163523.png

Also, ich möchte nicht das Ergebnis von 162085-66185-11598, sondern von 38618+39753+5971.

1 ACCEPTED SOLUTION
Jayee
Responsive Resident
Responsive Resident

Try this:

Kosten = SUMX( 'Tabelle', [Umsatz]* 'Tabelle'[Kostenquote])

 

If this post helps, then please consider Accept it as the solution, Appreciate your Kudos!!

View solution in original post

6 REPLIES 6
Broeselchen
Helper III
Helper III

Ich kann leider keine PBI hier hochladen. Aber, ich habe rausgefunden, was mein Problem ist. Ich habe in einer Spalte unterschiedliche Kostenquoten in %. Mit denen rechne ich Zeile für Zeile die Kosten aus. Das Measure dafür lautet so:

Kosten = CALCULATE(SUMX('Tabelle',[Umsatz])*CALCULATE(AVERAGEX('Tabelle', 'Tabelle'[Kostenquote])))
 
Das führt natürlich dazu, dass im Ergebnis mit diesem Mittelwert gerechnet wird und nicht die Summe der Kosten. Ich habe das mal in Excel nachgestellt:
Broeselchen_1-1668603713364.png

Gibt es dafür eine bessere Lösung?

Jayee
Responsive Resident
Responsive Resident

Try this:

Kosten = SUMX( 'Tabelle', [Umsatz]* 'Tabelle'[Kostenquote])

 

If this post helps, then please consider Accept it as the solution, Appreciate your Kudos!!

Yes! Thank you so much!

Broeselchen
Helper III
Helper III

Aber, die Einnahme und Ausgaben sind Measure und keine Tabellenspalten. Dann geht das nicht, oder?

 

Jayee
Responsive Resident
Responsive Resident

It depends on the data model you have any how you need to use function row context function to achieve this sumx is one of them if you can able to share PBI file with out sensitive data then can able to help further.

Jayee
Responsive Resident
Responsive Resident

Hi @Broeselchen ,

 

Verwenden Sie die Sumx-Funktion, um das erwartete Ergebnis zu erhalten

 

Ergebnis = sumx(table_name,Einahmen-ausgaben1-ausgaben2) 

 

 If this post helps, then please consider Accept it as the solution, Appreciate your Kudos!!

Helpful resources

Announcements
May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Submit your Data Story

Data Stories Gallery

Share your Data Story with the Community in the Data Stories Gallery.

Top Solution Authors