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
e0318476
Helper I
Helper I

Returning a result with 1 DAX function and 1 Column

Hi everyone, 

 

I need help in this

 

e0318476_0-1638155445261.png

 

'Percentage of Completion' is in calculated from DAX (i.e. Divide 'Modules Completed' with 'Total Modules').

 

I want to count how many people have completed the 100% of the course. The returning value should be 3. 

I am not sure how to write a DAX between 'Full Name' and 'Percentage of Completion'. 

 

Please help, thank you!

2 ACCEPTED SOLUTIONS
ryan_mayu
Super User
Super User

@e0318476 

maybe you can try this

Measure = 
VAR tbl=ADDCOLUMNS(SUMMARIZE('Table','Table'[Full Name],"module complete",sum('Table'[modules completed]),"module total",sum('Table'[Total Modules])),"percentage of completion",DIVIDE([module complete],[module total]))
return CALCULATE(DISTINCTCOUNT('Table'[Full Name]),FILTER(tbl,[percentage of completion]=1))

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

AlexisOlson
Super User
Super User

Try one of these:

SUMX (
    VALUES ( Table1[Full Name] ),
    IF ( [Percentage of Completion] = 1, 1 )
)
COUNTROWS (
    FILTER (
        VALUES ( Table1[Full Name] ),
        [Percentage of Completion] = 1
    )
)

View solution in original post

4 REPLIES 4
AlexisOlson
Super User
Super User

Try one of these:

SUMX (
    VALUES ( Table1[Full Name] ),
    IF ( [Percentage of Completion] = 1, 1 )
)
COUNTROWS (
    FILTER (
        VALUES ( Table1[Full Name] ),
        [Percentage of Completion] = 1
    )
)

Thank you very much @AlexisOlson ! The first solution is useful to resolve my question!

ryan_mayu
Super User
Super User

@e0318476 

maybe you can try this

Measure = 
VAR tbl=ADDCOLUMNS(SUMMARIZE('Table','Table'[Full Name],"module complete",sum('Table'[modules completed]),"module total",sum('Table'[Total Modules])),"percentage of completion",DIVIDE([module complete],[module total]))
return CALCULATE(DISTINCTCOUNT('Table'[Full Name]),FILTER(tbl,[percentage of completion]=1))

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Thank you @ryan_mayu ! 

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.