cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ranga_88
Helper I
Helper I

calculate sum based on another column distinct values

Hi Team,

     how to find sum using another column distinct values, after unpivoting the the columns im getting results like this

Capture1.PNG

 

i want to sum of Total column,    i need result is 3.7  but im getting 11.1

calculate the sum based on another column distinct values  How to solve this?

 

 

 

Thanks,

Ranga

 

 

 

 

1 ACCEPTED SOLUTION

@jacobs    it's work but i need other column to build the table

 

i'm looking measure only i have used below measure

 

Total sales = SUMX(DISTINCT('Table'[Category]),MAX('Table'[Total]))
 
it's work for me
 
Thanks

View solution in original post

2 REPLIES 2
jacobs
Frequent Visitor

I think what you want can be done in Power Query - Transform - Group by.

 

jacobs_5-1623930855751.png

 


When I do that I get the results you seek: 

 

jacobs_6-1623930855753.png

 

I used these settings for the step:

 

jacobs_7-1623930855755.png

 

Let me know if it works

 

@jacobs    it's work but i need other column to build the table

 

i'm looking measure only i have used below measure

 

Total sales = SUMX(DISTINCT('Table'[Category]),MAX('Table'[Total]))
 
it's work for me
 
Thanks

View solution in original post

Helpful resources

Announcements
Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Jan 2022 Dev Camp 768x460 copy.png

Power BI Dev Camp- January 27th, 2022

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors