Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

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)

 

 

 

  • 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?

4 Replies

  • 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?

    • Anonymous's avatar
      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
  • 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