cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
roofi00 Regular Visitor
Regular Visitor

Working with version type - multiple decimal points, show latest version

Hello,

 

I'm working with data which contains version column. It has numbers separated by decimals.

Here is example data:

SystemVersionDate
A16.9.011/3/2018
A16.11.011/5/2018
A16.10.011/5/2018
B7.8.211/4/2019
B6.5.311/1/2019
B7.0.211/2/2019

 

there might be different versions per system and we want to take the one that is the most recent one (highest digits).

I have created LATESTDATE measure and i want to show last versions for those last dates for each system.

What I want to get:

SystemVersionDate
A16.11.011/5/2018
B7.8.211/4/2019

 

But what I'm getting:

SystemVersionDate
A16.9.011/5/2018
B7.8.2

11/4/2019

 

 

I found this post where there is descirbed similar issue:

But it is good only for sorting, not for printing the exact values we have as version column.

 

Thanks for help 🙂

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Working with version type - multiple decimal points, show latest version

Hi @roofi00 ,

 

Try the following measure for Last version:

 

Last version =
CALCULATE (
    MAX ( 'Table'[Version] );
    FILTER (
        ALL ( 'Table'[Date]; 'Table'[System] );
        'Table'[Date] = MAX ( 'Table'[Date] )
            && 'Table'[System] = MAX ( 'Table'[System] )
    )
)

Should work as expected, see file attach.

 

Regards,

MFelix



Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!




View solution in original post

3 REPLIES 3
Super User
Super User

Re: Working with version type - multiple decimal points, show latest version

Hi @roofi00 ,

 

What do you mean by "But it is good only for sorting, not for printing the exact values we have as version column."

 

Believe that you have an issue with the measures / calculation you are using, can you share what are the setup you have on the table

 

But what I'm getting:

System Version Date
A 16.9.0 11/5/2018
B 7.8.2

11/4/2019

 

Regards,

MFelix



Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!




roofi00 Regular Visitor
Regular Visitor

Re: Working with version type - multiple decimal points, show latest version

@MFelix , sharing pbix file.

 

 

I thought about breaking it by decimals, sorting out and removing duplicates  - in second table. And then just join it.

Super User
Super User

Re: Working with version type - multiple decimal points, show latest version

Hi @roofi00 ,

 

Try the following measure for Last version:

 

Last version =
CALCULATE (
    MAX ( 'Table'[Version] );
    FILTER (
        ALL ( 'Table'[Date]; 'Table'[System] );
        'Table'[Date] = MAX ( 'Table'[Date] )
            && 'Table'[System] = MAX ( 'Table'[System] )
    )
)

Should work as expected, see file attach.

 

Regards,

MFelix



Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!




View solution in original post

Helpful resources

Announcements
New Ranks and Rank Icons in 2020

New Ranks and Rank Icons in 2020

Read the announcement for more information!

New Kudos Given Badges Coming

New Kudos Given Badges Coming

We're rolling out new Kudos Given badges. Find out how many Kudos you've given.

November 2019 Community Highlights

November 2019 Community Highlights

Get an overview of the events and great community content from November.

Power Platform World Tour

Power Platform World Tour

Find out where you can attend!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)