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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

How to sum one column based on another column, but keep filter selection applied on table?


I have a table, and a set of slicers that filter the table.

KimberleyTayJY_0-1663910810482.png


Currently, I am using the "customers" slicer to filter the "billing account name" column.
I want to display the "ecom source name" with the highest number of "total duitable shpmts" in another advanced card visualisation. To do that, I need to sum up the "total duitable shpmts" column for the same "ecom source name"s. (eg. emailship should show total of 4+2=6, and ecom should show total of 4+1=5)

I have seen solutions using ALLEXCEPT, and I have tried using the following measure (shown in the last column of visualisation)

 

App Version Sorted Total Duitable Shpmts Col =

var VarId= 'CIN Data Quality'[Ecom Source Name]
return
CALCULATE(SUM([Total Dutiable Shpmts]), FILTER('CIN Data Quality','CIN Data Quality'[Ecom Source Name]=VarId))

 

 But I am getting results that are disregarding the values for "billing account name" a.k.a "customers" in the filter selection.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Try Like

 

CALCULATE(SUM([Total Dutiable Shpmts]), FILTER(allselected('CIN Data Quality'),'CIN Data Quality'[Ecom Source Name]=Max('CIN Data Quality'[Ecom Source Name])))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , Try Like

 

CALCULATE(SUM([Total Dutiable Shpmts]), FILTER(allselected('CIN Data Quality'),'CIN Data Quality'[Ecom Source Name]=Max('CIN Data Quality'[Ecom Source Name])))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

You're an expert! Thank you so much! 👍

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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