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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
Marco181
New Member

Similar function

o/ , i would like to say if in dax there is a similar function that is "where" in SQL language... Thanks everybody!

1 ACCEPTED SOLUTION
ribisht17
Super User
Super User

We use where to FILTER in SQL and here we use the Filter function (and you can filter even without writing the Filter function (as mentioned below rightly )as well but the moral of the story is you are filtering 🙂 )

 DAX Filter - CALCULATE function (tutorialspoint.com)

Smart Phones Sales =
CALCULATE (
SUM ( Sales[Price] ),
FILTER (
Sales,
Sales[product] in { "iPhone","Samsung","Hawaii"}
))

 

In SQL you would say WHERE 

[product] in { "iPhone","Samsung","Hawaii"}

Regards,

Ritesh

Mark my post as a solution if it helped you| Gentlemen & Ladies|Munde and Kudis| I like your Kudos!! !!
My You Tube Channel !! Connect on Linkedin || Power BI for Tableau Users 

View solution in original post

2 REPLIES 2
ribisht17
Super User
Super User

We use where to FILTER in SQL and here we use the Filter function (and you can filter even without writing the Filter function (as mentioned below rightly )as well but the moral of the story is you are filtering 🙂 )

 DAX Filter - CALCULATE function (tutorialspoint.com)

Smart Phones Sales =
CALCULATE (
SUM ( Sales[Price] ),
FILTER (
Sales,
Sales[product] in { "iPhone","Samsung","Hawaii"}
))

 

In SQL you would say WHERE 

[product] in { "iPhone","Samsung","Hawaii"}

Regards,

Ritesh

Mark my post as a solution if it helped you| Gentlemen & Ladies|Munde and Kudis| I like your Kudos!! !!
My You Tube Channel !! Connect on Linkedin || Power BI for Tableau Users 

amitchandak
Super User
Super User

@Marco181 , the filter is used to filer , in calculate you can give filter without a filter too

 

refer

http://dataap.org/blog/2019/04/22/difference-between-calculate-with-and-without-filter-expression/

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days is here Carousel

Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.