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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
JohnCarl45
Frequent Visitor

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
Frequent Visitor

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors