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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
LD1
Helper III
Helper III

Filter function with DAX

Hi everyone, 

 

I would like to put a filter in a formula but i didn't find the solution on the web.

Can you help me to solve it please ? 

 

Here this is my explication :

 

1. I have 3 data in a table in the table "Marque"

Vetement
Chaussures
Accessoires

 

2. I would like to create one formula for each data of the table "Marque":

            => Sum of "Turnover€ "for [Marque="Vetement"]

            => Sum of "Turnover€" for [Marque="Chaussures"]

            => Sum of "Turnover€" for [Marque="Accessoires"]

 

Why? Because when i create a Visual, i have a couple of formula by "client" but i don't want to multiplicate all values with the data "Marque" only the Turnover. 

 

I haven't an other solution, if you have an optimisation of it, i'll take it 😉

 

LD1_0-1672667769027.png

 

Thank you in advance,

 

2 ACCEPTED SOLUTIONS
Greg_Deckler
Community Champion
Community Champion

@LD1 Try:

Measure = SUMX(FILTER('Marque',[Column] = "Vetement"),[Value])


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

Anonymous
Not applicable

Hi @LD1 ,

You can follow the below methods to get it, please find the details in the attachment.

1. Create a slicer using the field [Marque]

yingyinr_0-1672721224693.png

2. Create measures as below to get it

Sum of Turnover for Vetement = CALCULATE(SUM('Table'[Turnover€]),'Table'[Marque]="Vetement")
Sum of Turnover for Chaussures = CALCULATE(SUM('Table'[Turnover€]),'Table'[Marque]="Chaussures")
Sum of Turnover for Accessoires = CALCULATE(SUM('Table'[Turnover€]),'Table'[Marque]="Accessoires")

yingyinr_1-1672721284813.png

If the above one can't help you get the expected result, please provide some raw data in your table (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

View solution in original post

3 REPLIES 3
LD1
Helper III
Helper III

@Anonymous @Greg_Deckler 

It's amazing and finally so easy... ! Thank you for your help and your solution. 

Have a nice day

 

Anonymous
Not applicable

Hi @LD1 ,

You can follow the below methods to get it, please find the details in the attachment.

1. Create a slicer using the field [Marque]

yingyinr_0-1672721224693.png

2. Create measures as below to get it

Sum of Turnover for Vetement = CALCULATE(SUM('Table'[Turnover€]),'Table'[Marque]="Vetement")
Sum of Turnover for Chaussures = CALCULATE(SUM('Table'[Turnover€]),'Table'[Marque]="Chaussures")
Sum of Turnover for Accessoires = CALCULATE(SUM('Table'[Turnover€]),'Table'[Marque]="Accessoires")

yingyinr_1-1672721284813.png

If the above one can't help you get the expected result, please provide some raw data in your table (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Greg_Deckler
Community Champion
Community Champion

@LD1 Try:

Measure = SUMX(FILTER('Marque',[Column] = "Vetement"),[Value])


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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 community update carousel

Fabric Community Update - June 2025

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