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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
PakAli
Frequent Visitor

DAX Measure Using CountRows and FIlter

Hi All

I have been googling and spending too much time on this and could not get the result required

Hence, I seeking advice from all the experts

The plan is to made “TableD” measure dynamicly changed

Based on value in “TableAB” fields and measure

Note in below sample
AB, AC got TestABC value >0..  so “TableD” measure value is 1

 

However,
AD got TestABC value = 0… “TableD” measure value is also 1

This is not what is expected.. suppose to be “0”


my DAX formula

But I bet it is wrong… since need to consider TableAB measure value

But I do not really sure how to do the query correctly

 

xValue =

    CALCULATE(

        COUNTROWS(

 

        FILTER(

            TableD,

            TableD[LocID] in values(TableAB[locID]) &&

            NOT(ISBLANK(TableAB[TestABC])) &&

            TableAB[TestABC] > 0

        )

       

        )  

        

    )

 

I had pbix file to share.. but not sure how to attach

 

Test.png

1 REPLY 1
Anonymous
Not applicable

Hi @PakAli 

 

So then... You have not received any solutions yet, right? Maybe because it's not easy to understand what you want?

 

Please read this:

 

https://community.powerbi.com/t5/DAX-Commands-and-Tips/How-to-Get-Your-Question-Answered-Quickly/td-...

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.