cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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

Accepted Solutions
Highlighted
Helper I
Helper I

Re: excel to DAX formula

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

Re: excel to DAX formula

@Queen_Geek , Not very clear.

Refer if this can help

https://community.powerbi.com/t5/Desktop/Percentage-of-subtotal/td-p/95390



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
My Recent Blog -Week is not so Weak Connect on Linkedin

Proud to be a Super User!

Highlighted
Helper I
Helper I

Re: excel to DAX formula

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

Highlighted
Community Support
Community Support

Re: excel to DAX formula

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.
Highlighted
Helper I
Helper I

Re: excel to DAX formula

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

 
=

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

View solution in original post

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Upcoming Events

Upcoming Events

Wondering what events you could join or have an event to promote yourself? Check out our Upcoming Events.

Community Summit Australia – Join Online!

Community Summit Australia – Join Online!

Be a part of the leading Microsoft Business Applications digital event, curated for the APAC community.

Top Solution Authors
Top Kudoed Authors