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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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