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! Learn more

Reply
natasha519
Helper II
Helper II

Help with Measure

I have a measure with this formula:

 

Numerator = if(or(or(or(or(or(SELECTEDVALUE('Jurisdiction Filter'[Recipient])="California",SELECTEDVALUE('Jurisdiction Filter'[Recipient])="Hawaii"),SELECTEDVALUE('Jurisdiction Filter'[Recipient])="Iowa"),SELECTEDVALUE('Jurisdiction Filter'[Recipient])="Minnesota"),SELECTEDVALUE('Jurisdiction Filter'[Recipient])="Oklahoma"),SELECTEDVALUE('Jurisdiction Filter'[Recipient])="Puerto Rico"),Countrows(Filter(DOSE_Timeliness,DOSE_Timeliness[Timeliness Icon Status]=1)),countrows(Filter(DOSE_Timeliness,DOSE_Timeliness[Timeliness Icon Status]=1))
 
How can I incorporate another filter within this measure to say where the value from another table is not blank ('LatestData[name])?
4 REPLIES 4
Anonymous
Not applicable

Hi @natasha519 ,

 

Numerator =
VAR _count =
    CALCULATE (
        COUNTROWS ( DOSE_Timeliness ),
        FILTER ( DOSE_Timeliness, DOSE_Timeliness[Timeliness Icon Status] = 1 ),
        FILTER ( 'LatestData', NOT ( ISBLANK ( 'LatestData'[name] ) ) )
    )
RETURN
    IF (
        SELECTEDVALUE ( 'Jurisdiction Filter'[Recipient] )
            IN { "California", "Hawaii", "Iowa", "Minnesota", "Oklahoma", "Puerto Rico" },
        _count,
        _count
    )

One wired thing in your formula, the if function returns the same count when it gets right or wrong?

 

Best Regards,

Jay

VahidDM
Super User
Super User

Hi @natasha519 

 

First, I think you can use this rather thatn using many OR in the formula:

Numerator =
IF (
    SELECTEDVALUE ( 'Jurisdiction Filter'[Recipient] )
        IN { "California", "Hawaii", "Iowa", "Minnesota", "Oklahoma", "Puerto Rico" },
    COUNTROWS (
        FILTER ( DOSE_Timeliness, DOSE_Timeliness[Timeliness Icon Status] = 1 )
    ),
    COUNTROWS (
        FILTER ( DOSE_Timeliness, DOSE_Timeliness[Timeliness Icon Status] = 1 )
    )
)

 

Where do you want to add a new filter, in the result or in the statement?

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

amitchandak
Super User
Super User

@natasha519 , should work if tables are joined

 


Numerator = calculate(if(or(or(or(or(or(SELECTEDVALUE('Jurisdiction Filter'[Recipient])="California",SELECTEDVALUE('Jurisdiction Filter'[Recipient])="Hawaii"),SELECTEDVALUE('Jurisdiction Filter'[Recipient])="Iowa"),SELECTEDVALUE('Jurisdiction Filter'[Recipient])="Minnesota"),SELECTEDVALUE('Jurisdiction Filter'[Recipient])="Oklahoma"),SELECTEDVALUE('Jurisdiction Filter'[Recipient])="Puerto Rico"),Countrows(Filter(DOSE_Timeliness,DOSE_Timeliness[Timeliness Icon Status]=1)),countrows(Filter(DOSE_Timeliness,DOSE_Timeliness[Timeliness Icon Status]=1)) ) , filter('LatestData', not(isblank ('LatestData'[name]))) )

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

I am getting an unexpected expression error as soon as I insert a comma

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.