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
Anonymous
Not applicable

Last Status Summary

Hello guys, can you help me on my issue here?

So basically I want to create a summary table based on the daily status of an ID.

 

I have a table as shown below:

IDDateProjectDaily Status
ID115/10/2020Project ARegistered
ID116/10/2020Project AFollow Up
ID117/10/2020Project AFollow Up
ID118/10/2020Project AFollow Up
ID101/11/2020Project BRegistered
ID102/11/2020Project BFollow Up
ID103/11/2020Project BFollow Up
ID104/11/2020Project BFinished
ID215/10/2020Project ZRegistered
ID216/10/2020Project ZFollow Up
ID217/10/2020Project ZFollow Up
ID218/10/2020Project ZFinished
ID201/11/2020Project YRegistered
ID202/11/2020Project YFollow Up
ID203/11/2020Project YFollow Up
ID204/11/2020Project YFinished

 

And my goal is to create something like this:

IDStatus
ID1Active
ID2Finished

 

the logic is ID1 still active because he is still on "Follow Up" status on project A even though he is "Finished" on project B, vice versa for ID2.


Any suggestion?

Thank you

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Anonymous , Try a measure like

measure =
var _1 = calculate(lastnonblankvalue(Table[Date],max(Table[Status])), filter(allselected(table), Table[ID] = max(Table[ID])))
return
if (_1 = "Finished", "Finished" , "Active")

View solution in original post

v-alq-msft
Community Support
Community Support

Hi, @Anonymous 

 

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

Table:

c1.png

 

You may create a measure as below.

Result Measure = 
var numproject = 
CALCULATE(
    DISTINCTCOUNT('Table'[Project]),
    ALLEXCEPT('Table','Table'[ID])
)
var numstatus = 
CALCULATE(
    COUNTROWS('Table'),
    FILTER(
        ALLEXCEPT('Table','Table'[ID]),
        [Daily Status]="Finished"
    )
)
return
IF(
    numstatus<numproject,
    "Active",
    "Finished"
)

 

Result:

c2.png

 

Best Regards

Allan

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-alq-msft
Community Support
Community Support

Hi, @Anonymous 

 

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

Table:

c1.png

 

You may create a measure as below.

Result Measure = 
var numproject = 
CALCULATE(
    DISTINCTCOUNT('Table'[Project]),
    ALLEXCEPT('Table','Table'[ID])
)
var numstatus = 
CALCULATE(
    COUNTROWS('Table'),
    FILTER(
        ALLEXCEPT('Table','Table'[ID]),
        [Daily Status]="Finished"
    )
)
return
IF(
    numstatus<numproject,
    "Active",
    "Finished"
)

 

Result:

c2.png

 

Best Regards

Allan

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hey @v-alq-msft thank you for your effort to not only give the solution, also attach the pbix file. once again, thank you

amitchandak
Super User
Super User

@Anonymous , Try a measure like

measure =
var _1 = calculate(lastnonblankvalue(Table[Date],max(Table[Status])), filter(allselected(table), Table[ID] = max(Table[ID])))
return
if (_1 = "Finished", "Finished" , "Active")

Anonymous
Not applicable

thank you for your solution man, it really helps me #kudos

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.