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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Queen_Geek
Helper I
Helper I

excel to DAX formula

My data is all in columns on the same table-no relationships needed.  I need to find the % of projects that have lessons.  The screenshot is the excel version of the data output.  The excel formula is

=SUBTOTAL(9,Table1[Column1])/SUBTOTAL(3,Table1[Project])

 

How can I translate this into DAX? 

 

I tried this, but the % isn't correct (comes up 4.8%). 

Count of # Lessons divided by Count of Project =
DIVIDE(SUM('Table1'[# Lessons]), COUNTA('Table1'[Project]))
 

exec summary for power bi help.jpg

 
 
 
1 ACCEPTED SOLUTION

I figured it out on my own.  The answer was simply  

 
=

DIVIDE(Counta('Table1'[Startup]), COUNTA('Table1'[Project]))
 
.

View solution in original post

4 REPLIES 4
v-eachen-msft
Community Support
Community Support

Hi @Queen_Geek ,

 

After my tests, i got the same result with these formula. Maybe it is caused by your filter or slicer. You could add ALL() filter in your measure.

 

 

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

I figured it out on my own.  The answer was simply  

 
=

DIVIDE(Counta('Table1'[Startup]), COUNTA('Table1'[Project]))
 
.
amitchandak
Super User
Super User

That doesn't help.  There are no subtotals in my data, it's in columns, like the screenshot shows.  What isn't clear?  Here is a screenshot of the data (partial) if that helps?

Executive Summary screenshot 2.jpg

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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