cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

How to obtain the last status of an item by date

HI: 

 

I have a list of assets (called from A to E) that can be in differents status (Manufactured, Installed, ExitInstallation) by date as follows: 

 

AssetStatusDate
AAssociatedmartes, 21 de agosto de 2018
BAssociatedmartes, 21 de agosto de 2018
CManufacturedmartes, 14 de agosto de 2018
DManufacturedmartes, 14 de agosto de 2018
EManufacturedmartes, 14 de agosto de 2018
EExitInstallationviernes, 19 de octubre de 2018
CExitInstallationmiércoles, 10 de octubre de 2018
EExitInstallationlunes, 5 de noviembre de 2018
CExitInstallationlunes, 5 de noviembre de 2018
DManufacturedlunes, 5 de noviembre de 2018
AAssociatedlunes, 5 de noviembre de 2018
BAssociatedlunes, 5 de noviembre de 2018

 

We need to obtain the last status to each assets as follows: 

 

Status                                                     Count Assets

Associated2
Manufactured1
ExitInstallation2

 

Related with date filter to know in whic status was an asset or all of them. 

 

As well to represent an histogram to view 1 asset wich status has had during the time. 

 

Could you help me? 

 

BR

David

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: How to obtain the last status of an item by date

@davidestg

 

One way could be to add this calculated column which will flag the last dates for each asset

Then you can use the sum of this column

 

Calc Column =
IF (
    [Date] = CALCULATE ( MAX ( Table1[Date] ), ALLEXCEPT ( Table1, Table1[Asset] ) ),
    1
)

howto.png 

Try my new Power BI game Cross the River

View solution in original post

2 REPLIES 2
Highlighted
Super User III
Super User III

Re: How to obtain the last status of an item by date

@davidestg

 

One way could be to add this calculated column which will flag the last dates for each asset

Then you can use the sum of this column

 

Calc Column =
IF (
    [Date] = CALCULATE ( MAX ( Table1[Date] ), ALLEXCEPT ( Table1, Table1[Asset] ) ),
    1
)

howto.png 

Try my new Power BI game Cross the River

View solution in original post

Highlighted
Helper I
Helper I

Re: How to obtain the last status of an item by date

Excellent solution, it runs ok!! 

 

You are a crack! 

 

Thanks, 

David

 

Helpful resources

Announcements
Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Galleries

Galleries

Looking for inspiration on how to present your data? Need instructional videos? Check out our Galleries!

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors