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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
JohnCarl45
Helper I
Helper I

Filtering Two Categories in a column

Hi folks, good day. Can you help me to filter two name categories in the Account Column: "Service Income—SC" and "Service Income—External" to show the value of the remaining categories in the Account Column? Can you show me how to filter those two using Dax? It's a big help if you answer my question. Thanks in advance!

MonthAmountAccount
January86,234Service Income - SC
January98,234Service Income - SC
January4,952Service Income - SC
January57,586Service Income - SC
February32,293Service Income - External
February10,293Service Income - External
February9,836Service Income - External
February8,349Service Income - External
February15,294Service Income - External
March    400.00PHIC Contributions-COS 
March    347.00PHIC Contributions-COS 
March    400.00PHIC Contributions-COS 
March    347.00PHIC Contributions-COS 
March    400.00PHIC Contributions-COS 
March    347.00PHIC Contributions-COS 
March    347.00PHIC Contributions-COS 
April3,230Allowances - Medical-COS
April38,239Allowances - Medical-COS
April1,834Allowances - Medical-COS
April6,439Allowances - Medical-COS
April2,495Allowances - Medical-COS
1 ACCEPTED SOLUTION
v-jincheng-msft
Community Support
Community Support

Hi @JohnCarl45 ,

Hi, thanks for the information you have given.

To show the value of the remaining categories in the Account Column, you can use the DAX as follow:

Amount_ = var _t=CALCULATETABLE('Table', NOT('Table'[Account] IN {"Service Income - SC", "Service Income - External"}))

RETURN MAXX(_t,[Amount])

 

vjinchengmsft_0-1703669966195.png

 

 

 

 

An attachment for your reference. Hope it helps!

 

Best regards,
Community Support Team_ Joseph Ji

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-jincheng-msft
Community Support
Community Support

Hi @JohnCarl45 ,

Hi, thanks for the information you have given.

To show the value of the remaining categories in the Account Column, you can use the DAX as follow:

Amount_ = var _t=CALCULATETABLE('Table', NOT('Table'[Account] IN {"Service Income - SC", "Service Income - External"}))

RETURN MAXX(_t,[Amount])

 

vjinchengmsft_0-1703669966195.png

 

 

 

 

An attachment for your reference. Hope it helps!

 

Best regards,
Community Support Team_ Joseph Ji

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

Chakravarthy
Resolver II
Resolver II

@JohnCarl45 Please try to create measure like this 

Total of Account =
CALCULATE(SUM('Table 1'[Amount]),
  FILTER('Table 1','Table 1'[Account] IN {"PHIC Contributions-COS","Allowances - Medical-COS"})
)
Pull the Account column and this measure you will see the output as below
Chakravarthy_0-1703668471095.png

Hope this helps

Hi sir, good day. Thanks for the reply. I really appreciate it. Can you filter all the categories in the account column except for the two names in the account column, which are "PHIC Contributions-COS" and "Allowances-Medical-COS"? I really want to show all categories, except for two, because in the original data, there were almost 100k rows in Excel, so I want to show all the categories in the account, except for two.

JohnCarl45
Helper I
Helper I

Here is the formula I use to filter the categories, except for those two categories in the Account column. the "Service Income—SC" and "Service Income—External". 

Cost of Service 3 = SUMX(FILTER(ALL(Sheet1,Sheet1[Account]), EXCEPT("Service Income - SC" || "Service Income - External"), 'Sheet1'[sum of amount])))

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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

Top Solution Authors