Forum Discussion
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.
| 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 |
I've calculated the next task through
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")
returnif(mintask=min('Table'[Task]) ,1,0)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
6 Replies
- ribisht17Super 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 - WillAlexanderFrequent 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.- ribisht17Super User
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")
returnif(mintask=min('Table'[Task]) ,1,0)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- WillAlexanderFrequent Visitor
Yes looks like this worked, thank you!
- ribisht17Super 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 - ribisht17Super 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