cancel
Showing results for 
Search instead for 
Did you mean: 
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.

 

View solution in original post

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 III
Super User III

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
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are You Ready?

Test your skills now with the Cloud Skills Challenge.

Top Solution Authors