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

Get Fabric certified for FREE! Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

DAX Measure from Excel Formula

Hi,

Would someone know how I can convert my Excel formula to DAX? It's already 2 weeks, I tried every COUNT formula in PowerBI but no luck. Any suggestion is appreciated. Thank you!

 

=COUNTIFS('Scorecard-All'!H:H,">3%",C:C,">00:02:00",'Scorecard-All'!J:J,M2)/COUNTIF('Scorecard-All'!J:J, M2)

 

TechNewbie1_1-1597055126586.png

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , it would something like

countx('Scorecard-All', if('Scorecard-All' [H]>.03 && 'Scorecard-All'[C] > time(,2,0)),'Scorecard-All'[J] )/count('Scorecard-All'[J] )

 

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

View solution in original post

4 REPLIES 4
Greg_Deckler
Community Champion
Community Champion

@Anonymous  - You may find this helpful:

 

https://community.powerbi.com/t5/Community-Blog/Excel-to-DAX-Translation/ba-p/1060991

 

You generally replace COUNTIF with a COUNTX statement or a CALCULATE statement.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
amitchandak
Super User
Super User

@Anonymous , it would something like

countx('Scorecard-All', if('Scorecard-All' [H]>.03 && 'Scorecard-All'[C] > time(,2,0)),'Scorecard-All'[J] )/count('Scorecard-All'[J] )

 

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
Anonymous
Not applicable

Hi @amitchandak,

 

Thanks for this! I will try it and let you know! Below is the sample data that I am using to compute the "Buffering > 3% of viewing duration" column.

 

Sample Output:

CountryBuffering > 3% of viewing duration 
Canada4.62%

-------------------------------

Sample Data:

Sum of Buffering% bufferingCountry
0:00:021%Canada
0:09:5017%Canada
0:00:010%Canada
0:00:010%Canada
0:03:0526%Canada
0:00:010%Canada
0:00:170%Canada
0:00:040%Canada
0:00:010%Canada
0:00:010%Canada
0:00:010%Canada
0:02:578%Canada
0:00:010%Canada
0:00:010%Canada
0:00:010%Canada
0:00:000%Canada
0:00:020%Canada
0:00:020%Canada
0:00:000%Canada
0:00:010%Canada
0:00:110%Canada
0:00:140%Canada
0:00:030%Canada
0:00:050%Canada
0:00:020%Canada
0:00:000%Canada
0:00:010%Canada
0:00:010%Canada
0:00:000%Canada
0:00:010%Canada
0:00:010%Canada
0:00:000%Canada
0:00:010%Canada
0:00:070%Canada
0:00:010%Canada
0:00:000%Canada
0:00:020%Canada
0:00:021%Canada
0:00:010%Canada
0:01:133%Canada
0:00:130%Canada
0:01:064%Canada
0:00:000%Canada
0:00:010%Canada
0:00:030%Canada
0:00:000%Canada
0:00:211%Canada
0:00:130%Canada
0:00:211%Canada
0:00:010%Canada
0:00:010%Canada
0:00:250%Canada
0:00:040%Canada
0:00:511%Canada
0:00:311%Canada
0:00:210%Canada
0:00:101%Canada
0:01:556%Canada
0:00:040%Canada
0:02:182%Canada
0:00:270%Canada
0:00:030%Canada
0:01:131%Canada
0:00:010%Canada
0:00:020%Canada
Fowmy
Super User
Super User

@Anonymous 

To make it quick and easy, upload your data on to Power BI and make sure your data is properly organized. Then, show the column names and the expected output

____________________________________
How to paste sample data with your question?
How to get your questions answered quickly?

_____________________________________
Did I answer your question? Mark this post as a solution, this will help others!.

Click on the Thumbs-Up icon on the right if you like this reply 🙂

YouTube, LinkedIn


________________________

Did I answer your question? Mark this post as a solution, this will help others!.

Click on the Thumbs-Up icon on the right if you like this reply 🙂

YouTube, LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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