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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Johannesvd
Helper I
Helper I

Summing a column with a filter on multiple columns

Hi all,

 

Can someone help with a measure (or multiple) to sum the values in the column amount, per no.,per customer and only the GL accounts starting with an 8:

 

2017-09-27_13-43-58.jpg

 

Result:

 

Customer 1234  amount 1080

Customer 4321 amount  2001

 

 

 

2 REPLIES 2
Eric_Zhang
Microsoft Employee
Microsoft Employee


@Johannesvd wrote:

Hi all,

 

Can someone help with a measure (or multiple) to sum the values in the column amount, per no.,per customer and only the GL accounts starting with an 8:

 

2017-09-27_13-43-58.jpg

 

Result:

 

Customer 1234  amount 1080

Customer 4321 amount  2001

 

 

 


@Johannesvd

You can get the expected output by creating two measures as below. You can see more details in the attaced pbix file.

CustomerID = MAX(Table2[Customer])

Total Amount =
SUMX (
    FILTER ( Table2, LEFT ( Table2[GL], 1 ) = "8" && ISBLANK ( Table2[Customer] ) ),
    Table2[Amount]
)

Capture.PNG

 

By the way, the provided sample data is not normalized. I have some concern about your data for further analysis, as I can see your table contains summized data(1081and 2081, the total for No) and raw data(the lines with blank customer). The blank customer is also an issue.

@Eric_ZhangThanks! i was to quick marking this as the solution, but it helped me a few steps further.

 

So the data keeps on going, for example customer 1234 is a returning customer.   I dont want to use the column "no" in the result i only want to see the sum of the general ledgers starting with an 8 per customer.

Second question for learning purposes, why do u use :

 ISBLANK ( Table2[Customer])

Is this an extra check on your filter?

 

Thanks!

 

I will check on the data (You may noticed im a newbee)

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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