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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Need DAX quey for User completed all Trainings and if any of the user not completed show as in progr

Rocky_123_1-1658921206320.png

In above table I need dax query for Training requirement(TR), if all users completed TR then TR status should be Completed. If any of the user is IN Progress or Not completed then status should be In Progress. similarly is all are Not started it should be Not started. This is like and operation 

Rocky_123_2-1658921500160.png

Can some one help on this ASAP

1 ACCEPTED SOLUTION

Hi @Anonymous 
Here is the updated solution 

2.png1.png

TR Status = 
VAR NormalValue = SELECTEDVALUE ( Tasks[Satus] )
VAR AllStatus = CALCULATETABLE ( VALUES ( Tasks[Satus] ), ALLEXCEPT ( Tasks, Tasks[Trainee] ) )
VAR Completed = FILTER ( AllStatus, Tasks[Satus] = "Completed" )
VAR NotStarted = FILTER ( AllStatus, Tasks[Satus] = "Not Started" )
RETURN
    SWITCH ( 
        TRUE ( ),
        COUNTROWS ( AllStatus ) = COUNTROWS ( Completed ), "Completed",
        COUNTROWS ( AllStatus ) = COUNTROWS ( NotStarted ), "Not Started",
        "In Progress"
    )

View solution in original post

8 REPLIES 8
tamerj1
Super User
Super User

Hi @Anonymous 
Here is a sample file with the solution https://we.tl/t-RWLCO2vdgj

1.png 

TR Status = 
VAR NormalValue = SELECTEDVALUE ( Tasks[Satus] )
VAR AllStatus = VALUES ( Tasks[Satus] )
VAR Completed = FILTER ( AllStatus, Tasks[Satus] = "Completed" )
VAR NotStarted = FILTER ( AllStatus, Tasks[Satus] = "Not Started" )
RETURN
    SWITCH ( 
        TRUE ( ),
        ISINSCOPE ( Tasks[Task] ), NormalValue,
        COUNTROWS ( AllStatus ) = COUNTROWS ( Completed ), "Completed",
        COUNTROWS ( AllStatus ) = COUNTROWS ( NotStarted ), "Not Started",
        "In Progress"
    )
Anonymous
Not applicable

Thanks for the query.. Almost worked. But for all completed also it is showing IN Progress.

Rocky_123_0-1658936683927.png

 

Hi @Anonymous 
Here is the updated solution 

2.png1.png

TR Status = 
VAR NormalValue = SELECTEDVALUE ( Tasks[Satus] )
VAR AllStatus = CALCULATETABLE ( VALUES ( Tasks[Satus] ), ALLEXCEPT ( Tasks, Tasks[Trainee] ) )
VAR Completed = FILTER ( AllStatus, Tasks[Satus] = "Completed" )
VAR NotStarted = FILTER ( AllStatus, Tasks[Satus] = "Not Started" )
RETURN
    SWITCH ( 
        TRUE ( ),
        COUNTROWS ( AllStatus ) = COUNTROWS ( Completed ), "Completed",
        COUNTROWS ( AllStatus ) = COUNTROWS ( NotStarted ), "Not Started",
        "In Progress"
    )
Anonymous
Not applicable

Thanks a lot. This query worked. U r the master.

SpartaBI
Community Champion
Community Champion

@Anonymous you need a DAX query / DAX calculated column / DAX measure to plot it eventually in a visual? 3 different things 🙂
Also, can you please provide a sample data to work on (not a screenshot)

Anonymous
Not applicable

I Need DAX Column and I don't have access to send data. Only I can send screenshots

@Anonymous 

 

Result_CC = 
SWITCH(
	TRUE(),
	'Table'[Task1] = "Not Started" && 'Table'[Task2] = "Not Started" && 'Table'[Task3] = "Not Started", "Not Started",
	'Table'[Task1] = "Completed" && 'Table'[Task2] = "Completed" && 'Table'[Task3] = "Completed", "Completed",
	"In Progress"
	)

 


2022-05-19 17_30_22-Re_ Need help on DAX function with measure vs colu... - Microsoft Power BI Commu.png


Full-Logo11.png

SpartaBI_3-1652115470761.png   SpartaBI_1-1652115142093.png   SpartaBI_2-1652115154505.png

Showcase Report – Contoso By SpartaBI

Anonymous
Not applicable

Thanks for the reply. I need query based on user and status.

Like in a Training 1 if all the users completed then in should be completed. Plz try on this

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.