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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Matt_HD
Frequent Visitor

Convert Conditional CountIFS from Excel to DAX , help please

Hi 

 

I have the following excel formula

 

=IF(

[@[Is Standard]]=FALSE,

COUNTIFS([Programme],[@Programme],[Framework/Standard Title],[@[Framework/Standard Title]],[Overall cohort year],[@[Overall cohort year]]),

COUNTIFS([Framework/Standard Title],[@[Framework/Standard Title]],[Overall cohort year],[@[Overall cohort year]])

)

 

Assume its all in one table (Table1)      how do I write this as a measure?

 

Thanks in advance

2 REPLIES 2
AntrikshSharma
Super User
Super User

Try something like this:

Measure =
VAR FirstResult =
    COUNTROWS (
        FILTER (
            Table,
            Table[Programme] = "Some Condition"
                && Table[Framework/Standard Title] = "Some Condition"
                && Table[Overall cohort year] = "Some Condition"
        )
    )
VAR SecondResult =
    COUNTROWS (
        FILTER (
            Table,
            Table[Framework/Standard Title] = "Some Condition"
                && Table[Overall cohort year] = "Some Condition"
        )
    )
RETURN
    IF ( SELECTEDVALUE ( Table[Is Standard] ) = "False", FirstResult, SecondResult )

 

amitchandak
Super User
Super User

@Matt_HD , Can you share sample data and sample output in table format? 

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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