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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Countif DAX

Hi i would like to convert this formula in Excel to Dax 

=IF(D2=D1,"",IF(COUNTIF(AH2:AH14,"YES")+COUNTIF(AH2:AH14,"N/A")<13,"NO","YES"))

 

thanks a lot 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

As @v-ljerr-msft said, this will be difficult based on what you have shown here.  DAX is more column named based.  Sounds like you are after a measure though.  My best guess would be something that looks like this, which assumes you want it to be context sensitive:

YourMeasure = IF(
	CALCULATE(
		countrows('YourTable'),		
		OR(
			'YourTable'[AHColumnsName] = "YES",
			'YourTable'[AHColumnsName] = "N/A"
		)
	) < 13,
	"NO",
	"YES"
)

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

As @v-ljerr-msft said, this will be difficult based on what you have shown here.  DAX is more column named based.  Sounds like you are after a measure though.  My best guess would be something that looks like this, which assumes you want it to be context sensitive:

YourMeasure = IF(
	CALCULATE(
		countrows('YourTable'),		
		OR(
			'YourTable'[AHColumnsName] = "YES",
			'YourTable'[AHColumnsName] = "N/A"
		)
	) < 13,
	"NO",
	"YES"
)

 

Anonymous
Not applicable

Thank you all for this gret answers . 

v-ljerr-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous,

 

Just knowing the Excel formula, it will be hard for us to convert it to DAX formula which works for you. Could you post your table structures with some sample/mock data, and the expected result? So that we can better assist on this issue. Smiley Happy

 

Regards

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.