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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
mikeohara
Frequent Visitor

Suming up only visible values from column X grouped by column Y

Hello,

 

I am trying to create calculated column Sale_Sum that will sum up all values from Sale_Amt column grouped by Client_ID.

 

My formula is:

Sale_Sum = SUMX(FILTER(Sales;Sales[Client_ID] = EARLIER(Sales[Client_ID]));Sales[Sale_Amt])

However this sums up all values in dataset, while I want to limit it only to visible rows.

 

This means with filters applied I would like to see Sale_Sum of 100 next to Client_ID = 1.

 

Dataset:

dataset.PNG

 

Dashboard without filters:

no filter.PNG

Dashboard with filters:

filter.PNG

Thanks in advance.

Mike

 

 

1 ACCEPTED SOLUTION

Done, I have used:

 

Sale_Sum_Group_By_Meas = CALCULATE(SUM(Sales[Sale_Amt]);FILTER(ALLSELECTED(Sales);Sales[Client_ID] = MAX(Sales[Client_ID])))

View solution in original post

2 REPLIES 2
mikeohara
Frequent Visitor

bump

Done, I have used:

 

Sale_Sum_Group_By_Meas = CALCULATE(SUM(Sales[Sale_Amt]);FILTER(ALLSELECTED(Sales);Sales[Client_ID] = MAX(Sales[Client_ID])))

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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