Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I am relatively new to using DAX and was wondering if the below excel formula be converted into DAX?
=IF(COUNTIF('County Player List'!A:A,[@County])>0,"Yes", "No")
Solved! Go to Solution.
@sb2848 COUNTIF is COUNTX(FILTER(...),...) in DAX. CO-CU Excel to DAX Translation - Microsoft Power BI Community
Hi, @sb2848
Here are the steps you can refer to :
(1)This is my test data:
(2)We can click "New Column" to create a calculated column :
Flag = var _current_cou='County List'[Country]
var _count =COUNTROWS( FILTER('All Data 2021 & 2022','All Data 2021 & 2022'[County] = _current_cou ))
return
IF(_count >0 ,"Yes" ,"No")
(3)The result is as follows:
If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
I tried a different approach converting the below excel formula into DAX, I tried a different approach, but I am not getting the right output. Hoping you can point me in the right direction.
=IF(COUNTIF('County List'!A:A,[@County])>0,"Yes", "No")
my approach
County = CALCULATE(COUNT('County List'[County] >0, FILTER('All Data 2021 & 2022', 'All Data 2021 & 2022'[County] = "Yes" || 'All Data 2021 & 2022' [County] = "No"))
Hi, @sb2848
Here are the steps you can refer to :
(1)This is my test data:
(2)We can click "New Column" to create a calculated column :
Flag = var _current_cou='County List'[Country]
var _count =COUNTROWS( FILTER('All Data 2021 & 2022','All Data 2021 & 2022'[County] = _current_cou ))
return
IF(_count >0 ,"Yes" ,"No")
(3)The result is as follows:
If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
@sb2848 COUNTIF is COUNTX(FILTER(...),...) in DAX. CO-CU Excel to DAX Translation - Microsoft Power BI Community
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
68 | |
64 | |
52 | |
39 | |
26 |
User | Count |
---|---|
80 | |
57 | |
45 | |
44 | |
35 |