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

Find last Product Rev - either Calculated Column or Measure

Hi Everyone,

 

I have been struggling to find a solution to finding that last time my Product Rev changed.  The goal is to have my Power BI show if the revision changed and so far all my attempts have not worked.

 

Here are the basic columns which have my details.

 

VersionProductProd RevLatest Rev Date
1/1/2023RedRev 11/1/2023
1/1/2023OrangeRev 21/1/2023
1/1/2023BlackRev 11/1/2023
1/8/2023RedRev 21/8/2023
1/15/2023RedRev 21/8/2023
1/15/2023OrangeRev 21/1/2023
1/22/2023OrangeRev 31/22/2023
2/2/2023OrangeRev 31/22/2023
2/2/2023BlackRev 11/1/2023
2/9/2023BlackRev 22/9/2023
2/16/2023BlackRev 22/9/2023
2/16/2023RedRev 32/16/2023
2/23/2023RedRev 32/16/2023
2/23/2023BlackRev 22/9/2023
3/2/2023BlackRev 33/2/2023
3/9/2023BlackRev 33/2/2023

 

You can see in the table the Latest Rev Date stays with the Product Versions (report dates) till the Prod Rev changes again. 

 

I think a calculated column makes the most sense because my dataset it several million rows and I am worried about load time, but I could work with a measure probably.

 

Thanks!

Matt

2 ACCEPTED SOLUTIONS
tamerj1
Super User
Super User

Hi @Anonymous 

in your example you are showing the minimum version for the same Product/Prod Rev. but you asking for the last? Please clarify. Otherwise, to produce the same results as per the provided sample and results you may try a calculated column 

Latest Rev Date =
CALCULATE ( MIN ( 'Table'[Version] ), ALLEXCEPT ( 'Table', 'Table'[Product], 'Table'[Prod Rev] ) )

View solution in original post

Anonymous
Not applicable

Hi @tamerj1 ,

 

You got it perfect!  Sorry about the mix up in min and max.  Min was what I was looking for.  

 

Thank you so much!

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @tamerj1 ,

 

You got it perfect!  Sorry about the mix up in min and max.  Min was what I was looking for.  

 

Thank you so much!

tamerj1
Super User
Super User

Hi @Anonymous 

in your example you are showing the minimum version for the same Product/Prod Rev. but you asking for the last? Please clarify. Otherwise, to produce the same results as per the provided sample and results you may try a calculated column 

Latest Rev Date =
CALCULATE ( MIN ( 'Table'[Version] ), ALLEXCEPT ( 'Table', 'Table'[Product], 'Table'[Prod Rev] ) )

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.