Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

Value with bigest ID on every Month

Hey guys,

 

I am trying to get a single Value, for every Fund, every month. The value should be the one with the biggest ID. How would you calculate such a thing?

 

It should be these values:

Screenshot 2021-08-11 122407.png

I am ataching an example PBI file:

https://www.dropbox.com/s/ci46thhglrmdt62/Example.pbix?dl=0

 

1 ACCEPTED SOLUTION
Thejeswar
Community Champion
Community Champion

Hi @Anonymous ,

You can create a new calculated Column with the below DAX. That should give the Max IDs for a Fund and Month

 

max_id = MAXX(FILTER('VNT Vertės', 'VNT Vertės'[Fund] == EARLIER('VNT Vertės'[Fund]) && 'VNT Vertės'[Date] == EARLIER('VNT Vertės'[Date])), 'VNT Vertės'[ID])

 

below is the screenshot with the new column output

Thejeswar_0-1628675568704.png

 

Now if we remove the ID column from the visul and use the one that we have created now. It gives the expected output

 

Thejeswar_1-1628675627178.png

 

Hope this solves!!

If it is the expected, mark it as a anwer that will be helpful for others!!

View solution in original post

3 REPLIES 3
Thejeswar
Community Champion
Community Champion

Hi @Anonymous ,

You can create a new calculated Column with the below DAX. That should give the Max IDs for a Fund and Month

 

max_id = MAXX(FILTER('VNT Vertės', 'VNT Vertės'[Fund] == EARLIER('VNT Vertės'[Fund]) && 'VNT Vertės'[Date] == EARLIER('VNT Vertės'[Date])), 'VNT Vertės'[ID])

 

below is the screenshot with the new column output

Thejeswar_0-1628675568704.png

 

Now if we remove the ID column from the visul and use the one that we have created now. It gives the expected output

 

Thejeswar_1-1628675627178.png

 

Hope this solves!!

If it is the expected, mark it as a anwer that will be helpful for others!!

Anonymous
Not applicable

Figured it out myself I just added another condition using te same logic. Thank you!! 

Anonymous
Not applicable

Thank you very much, it worked like you said, but I mislead you a little. I applied a few filters in transform data mode to make it more simple, but when I turned those filters of, your formula stopped working and I can't determine why. 

 

Here is the updated file:

 

https://www.dropbox.com/s/ci46thhglrmdt62/Example.pbix?dl=0

 

And also, could you explain what == stands for?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.