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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.