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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
KarlheinzLedere
New Member

Add column filled with sum from one column based on other column / Power BI

I have a data that looks like this:

data.jpg

 

I need a formula to add a column and fill a field in the same line, when “Tabelle1.Product” is filled (in Excel IF), it should cumulate “Revenue_Euro” where “sales_acct_unit3” is the same (in Excel SUMIF).

 

Anyone can point me in the right diection?

1 ACCEPTED SOLUTION
V-pazhen-msft
Community Support
Community Support

@KarlheinzLedere 

 

The description is a bit confusing but I guess I see your requirement. Try create the following measure:

Measure = If(max([Tabelle1.Product])<>Blank(), Calcuate(sum([Revenue_Euro]), filter(allselected(table), [sales_acct_unit3]=Max([sales_acct_unit3]))))


Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

3 REPLIES 3
V-pazhen-msft
Community Support
Community Support

@KarlheinzLedere 

 

The description is a bit confusing but I guess I see your requirement. Try create the following measure:

Measure = If(max([Tabelle1.Product])<>Blank(), Calcuate(sum([Revenue_Euro]), filter(allselected(table), [sales_acct_unit3]=Max([sales_acct_unit3]))))


Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

 

KarlheinzLedere
New Member

Hello @AIB,

 

i added a picture in there where you can see the table.

I have the column "“sales_acct_unit3”" which is filled with different values, in my example its "S530". And i need a field filled in an extra coumn in the same row as there a values in the column "Tabelle1.product" having the sum of the column "Revenue_Euro" where all have the same value in "“sales_acct_unit3”"

 

In that example: In the row where "Sigma" is the value, i want a field next to "Sigma" with the sum of all "S530" fields, because in the row with Sigma the value of “sales_acct_unit3” the value is "S530"

 

 

AlB
Super User
Super User

Hi @KarlheinzLedere 

You need to provide more info. Cumulative over what? Date? Since when?

What fields do you have as rows in your table visual (i.e., determining the context filter)?

Can you show a sample of your table?

Or ideally share the pbix 

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

SU18_powerbi_badge

 

 

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors
Top Kudoed Authors