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

Calculate max and group the rest as n-1

Hi,

 

I've been asked to provide insight in how many version numbers are lower than the latest two versions. So n, n-1 and n-x. I have a data column with version numbers ranging from 10.0 to 5.0 and I want to visualise the highest version, n-1 and n-x (all the rest). Below is an example of the data:

VersionCount
102041
8.3303
8.23
7.9918
7.85
6.3473
6.25398
6.110264
5.112044

What i would like to show is something like this:

VersionCount VersionOrder
102041N
8.3303N-1
<8.319105N-x

 

I feel like this shouldn't be that hard, but I'm fairly new to powerbi and not that experienced with the Calculate function or others to get this working for me. I hope someone here will be able to help out!

Many thanks in advance!

Odi

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi, @Odi 

Please kindly check the below picture, if that is what you are looking for.

I created a table that is for the purpose of grouping versions by N, N-1, N-x

 

The sample pbix file's link is down below, and all measures are in the file.

 

Picture4.png

 

https://www.dropbox.com/s/xu0gz2ry3sjzusj/Odi.pbix?dl=0 

 

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster.

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

2 REPLIES 2
Jihwan_Kim
Super User
Super User

Hi, @Odi 

Please kindly check the below picture, if that is what you are looking for.

I created a table that is for the purpose of grouping versions by N, N-1, N-x

 

The sample pbix file's link is down below, and all measures are in the file.

 

Picture4.png

 

https://www.dropbox.com/s/xu0gz2ry3sjzusj/Odi.pbix?dl=0 

 

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster.

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Hi Jihwan Kim,

Thanks a lot! This has really helped me out. I've been able to replicate it using my full dataset and I can even expand it with n-2 or n-3 if I would want to!

I'll admit that it will take a bit of studying to really figure out what your steps are and how this has all come about the way that it does, but for now it works and that is perfect.

 

Greatful thanks,

Odi

Helpful resources

Announcements
August 2022 update 768x460.jpg

Check it Out!

Click here to learn more about the August 2022 updates!

August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors