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
jppuam
Helper V
Helper V

calculate with 5 filters simultaneous

Hello,

i'm trying to implement a measure but i've to filter with 4 ou 5 criterias.

The filter in calculate only accepts 2 arguments. How can i make this ?

 

thanks,

JR

1 ACCEPTED SOLUTION

Hello,

i've reached a solution. What i've done is use the switch to contain all the formulas of the metrics and create a general metric that gives all the values.

Thanks for the help,

JR

View solution in original post

4 REPLIES 4
v-xiaotang
Community Support
Community Support

Hi @jppuam 

vxiaotang_0-1630634692871.png

https://docs.microsoft.com/en-us/dax/filter-function-dax

you can try this, e.g.

Measure = CALCULATE(SUM('Table'[Sales]),FILTER(ALL('Table'),'Table'[Date]>=DATE(2021,4,1) && 'Table'[Region]="Region2" && 'Table'[Status] in {"Status1","Status3"}))

result

vxiaotang_2-1630635624221.png

 

Best Regards,

Community Support Team _Tang

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

Hello,

i've reached a solution. What i've done is use the switch to contain all the formulas of the metrics and create a general metric that gives all the values.

Thanks for the help,

JR

Hi @jppuam 

thanks for your reply, could you close this thread by kindly accept the answer helpful as the solution. so the others can find it more quickly.

if you have question later, you can also add question in this thread or create a new one.

really appreciate!


Best Regards,
Community Support Team _Tang

Greg_Deckler
Super User
Super User

@jppuam In the filter param of CALCULATE use commas to separate your filter statements or use FILTER( ... ).


@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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