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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

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?

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
Super User
Super User

@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!:
Power BI Cookbook Third Edition (Color)

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?

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
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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