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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
WillAlexander
Frequent Visitor

Returning Value based on MIN

Hi All,

 

I have a list of tasks that need to be completed. In my report I am wanting to display the next task that needs to be completed.

 

So I would need to find the Minimum Task number that has not been completed and return the value of the task but i'm unsure how to input this into a measure. 

 

NSWTender StrategyTermination1Completed
NSWTender StrategyIssue termination letter to Force Fire2Completed
NSWTender StrategyAsset List finalisation3Completed
NSWTender StrategySME Scope Presentation4Completed
NSWTender StrategyList of supplier5Completed
NSWTender StrategyRequirement gathering from State Ops & State Leads6Completed
NSWTender StrategyApproval7Completed
NSWTransitionComms to the suppliers for the tender outcome15 
NSWTransitionContract signing16 
NSWTransitionCommencing Transition17 
QLDTender StrategyAsset List finalisation1Completed
QLDTender StrategySME Scope Presentation2Completed
QLDTender StrategyList of supplier3Completed
QLDTender StrategyRequirement gathering from State Ops & State Leads4Completed
QLDTender StrategyApproval5Completed
QLDTransitionComms to the suppliers for the tender outcome13 
QLDTransitionContract signing14 
QLDTransitionCommencing Transition15 

 

I've calculated the next task through

Next Task =
CALCULATE(MIN('Tender Schedule'[Task]), FILTER('Tender Schedule', 'Tender Schedule'[Completed?]<>"Completed"))
 
Including Activities in a table shows the minimum of all activity types.
 
WillAlexander_0-1688618920553.png
What I would want is to only show the next task (minimum task number) similar to the below.
 

WillAlexander_1-1688619035393.png

 

1 ACCEPTED SOLUTION

Hi @WillAlexander 

 

 

I think you are looking for this one

 

I used your dataset above

NSW Tender Strategy Termination 1 Completed
NSW Tender Strategy Issue termination letter to Force Fire 2 Completed
NSW Tender Strategy Asset List finalisation 3 Completed
NSW Tender Strategy SME Scope Presentation 4 Completed
NSW Tender Strategy List of supplier 5 Completed
NSW Tender Strategy Requirement gathering from State Ops & State Leads 6 Completed
NSW Tender Strategy Approval 7 Completed
NSW Transition Comms to the suppliers for the tender outcome 15  
NSW Transition Contract signing 16  
NSW Transition Commencing Transition 17  
QLD Tender Strategy Asset List finalisation 1 Completed
QLD Tender Strategy SME Scope Presentation 2 Completed
QLD Tender Strategy List of supplier 3 Completed
QLD Tender Strategy Requirement gathering from State Ops & State Leads 4 Completed
QLD Tender Strategy Approval 5 Completed
QLD Transition Comms to the suppliers for the tender outcome 13  
QLD Transition Contract signing 14  
QLD Transition Commencing Transition 15  

 

 

Solution = var mintask= CALCULATE(min('Table'[Task]),ALLEXCEPT('Table','Table'[State]),'Table'[Status]<>"Completed")


             return
                    if(mintask=min('Table'[Task]) ,1,0)
 
 
ribisht17_1-1688648089246.png

 

 
Mark my post as a solution if it helped you| Munde and Kudis (Ladies and Gentlemen) I like your Kudos!! !!
My YT Channel Dancing With Data !! Connect on Linkedin !!Power BI for Tableau Users 
 
 

 

View solution in original post

6 REPLIES 6
ribisht17
Super User
Super User

Did it help?

If yes please mark and if not , please let us know

 

Regards,

Ritesh

Mark my post as a solution if it helped you| Munde and Kudis (Ladies and Gentlemen) I like your Kudos!! !!
My YT Channel Dancing With Data !! Connect on Linkedin !!Power BI for Tableau Users 
ribisht17
Super User
Super User

Did it help?

 

Ritesh

Mark my post as a solution if it helped you| Munde and Kudis (Ladies and Gentlemen) I like your Kudos!! !!
My YT Channel Dancing With Data !! Connect on Linkedin !!Power BI for Tableau Users 
WillAlexander
Frequent Visitor

Thank you for the tip but it looks like both function return the same values.

I'm still looking to find out how I can show the next uncompleted task.

Hi @WillAlexander 

 

 

I think you are looking for this one

 

I used your dataset above

NSW Tender Strategy Termination 1 Completed
NSW Tender Strategy Issue termination letter to Force Fire 2 Completed
NSW Tender Strategy Asset List finalisation 3 Completed
NSW Tender Strategy SME Scope Presentation 4 Completed
NSW Tender Strategy List of supplier 5 Completed
NSW Tender Strategy Requirement gathering from State Ops & State Leads 6 Completed
NSW Tender Strategy Approval 7 Completed
NSW Transition Comms to the suppliers for the tender outcome 15  
NSW Transition Contract signing 16  
NSW Transition Commencing Transition 17  
QLD Tender Strategy Asset List finalisation 1 Completed
QLD Tender Strategy SME Scope Presentation 2 Completed
QLD Tender Strategy List of supplier 3 Completed
QLD Tender Strategy Requirement gathering from State Ops & State Leads 4 Completed
QLD Tender Strategy Approval 5 Completed
QLD Transition Comms to the suppliers for the tender outcome 13  
QLD Transition Contract signing 14  
QLD Transition Commencing Transition 15  

 

 

Solution = var mintask= CALCULATE(min('Table'[Task]),ALLEXCEPT('Table','Table'[State]),'Table'[Status]<>"Completed")


             return
                    if(mintask=min('Table'[Task]) ,1,0)
 
 
ribisht17_1-1688648089246.png

 

 
Mark my post as a solution if it helped you| Munde and Kudis (Ladies and Gentlemen) I like your Kudos!! !!
My YT Channel Dancing With Data !! Connect on Linkedin !!Power BI for Tableau Users 
 
 

 

Yes looks like this worked, thank you!

ribisht17
Super User
Super User

hi   

Please make use of MINX function here


https://learn.microsoft.com/en-us/dax/minx-function-dax

 

MINX(TABLE,NEW TASK)

 

Ritesh

Mark my post as a solution if it helped you| Munde and Kudis (Ladies and Gentlemen) I like your Kudos!! !!
My YT Channel Dancing With Data !! Connect on Linkedin !!Power BI for Tableau Users 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.