Solved

The latest Month

  • 3 October 2023
  • 3 replies
  • 219 views

Userlevel 2
Badge +2

Dear Community,

 

I have a transaction List and have a Property which Type is Dimension (Month) Text.

I’m looking to create a metric that tells me the latest month on that property.

 

How can I achieve that?

 

Thanks in advance :D

icon

Best answer by francois 3 October 2023, 09:14

View original

3 replies

Userlevel 7
Badge +14

Hi Guillermo,

I wrote an article a while back on this topic!

You’ll have to turn your text value in a Month or a date though before proceeding - you can do that with those functions - share with us your format if you need more help!

 

 

Userlevel 6
Badge +12

Hi,

 

I wanted to add a remark on this because I often see errors around the modifier behaviors.

Here, by “Latest” I know you want to return the most recent Month, and intuitively, you might want to use the “Last” or “Lastnonblank” modifier.

 

"Last" versus "Max" modifiers

Last is the last item of the list, from top to bottom, so if your list isn't chronologically ordered like ListC in the example below, you might end up with having unexpected results.

Max returns the highest value, no matter the order of the items.

 

Let’s take this list as an example:

 

You can notice that Rome has 2 values but their order is not logical.

 

if you want to return the last Month on all the rows:

 

if you want to return the highest Month value on all the rows:

 

if you want to return the last Month by a List dimension (Location in this example):

 

if you want to return the highest Month value by a List dimension (Location in this example):

 

Hope it helps.

Best,

Userlevel 2
Badge +2

Love your answer Benoit! cristal clear

Reply