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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
shashar11
Frequent Visitor

Need Suggestion

Hello-

 

I was suggested below measure for calculating the count of records from Column A where column B value is >=3 from excel spreadsheet.
Measure =
CALCULATE(
DISTINCTCOUNT('Table'[Column A]),'Table'[Column B] >= 3
)

Now, I am also trying to count the number of records from column A where Column B>=3 and column C =Yes.
In addition to above, I am also trying to count the number of records from
column A where Column B>=3 or column C =Yes. Can anyone kindly suggest.
Also please refer any guide where I can learn/try more of the DAX queries.

 

Thank you in advance!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

For more than one filter use filter clause

 

Measure =
CALCULATE(
DISTINCTCOUNT('Table'[Column A]),filter('Table','Table'[Column B] >= 3 && 'Table'[Column C] ="Yes")
)

 

For and use && and for Or use ||

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
https://community.powerbi.com/t5/Community-Blog/Winner-Topper-on-Map-How-to-Color-States-on-a-Map-wi...
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...
https://community.powerbi.com/t5/Community-Blog/Power-BI-Working-with-Non-Standard-Time-Periods/ba-p...
https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601

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

View solution in original post

3 REPLIES 3
d_gosbell
Super User
Super User

The calculate function will accept an array of multiple filters so this could also be written as:

 

Measure =
CALCULATE(
DISTINCTCOUNT('Table'[Column A])
,'Table'[Column B] >= 3
,'Table'[Column C] = "Yes"
)

 

amitchandak
Super User
Super User

For more than one filter use filter clause

 

Measure =
CALCULATE(
DISTINCTCOUNT('Table'[Column A]),filter('Table','Table'[Column B] >= 3 && 'Table'[Column C] ="Yes")
)

 

For and use && and for Or use ||

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
https://community.powerbi.com/t5/Community-Blog/Winner-Topper-on-Map-How-to-Color-States-on-a-Map-wi...
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...
https://community.powerbi.com/t5/Community-Blog/Power-BI-Working-with-Non-Standard-Time-Periods/ba-p...
https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601

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

Although logic suggested is correct, I am not sure why I am not getting the right results. Could be data issue.

However, I cannot share the data as its confidential. For now, I am accepting it as a solution. Thank you.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.