cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors