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

Max Month only with Data

I want a text box to return the Max(month) or latest month which has data in it.

The problem is when I use the max (month) in always returns 12/Dec because I have loaded in a mapping table with months/dates going out to 2015.

Is there a way of writing my expression such that Max(month) will return only the latest month for which revenues exist?

Thanks in advance!

1 Reply
vgutkovsky
Master II
Master II

Sure, you can do this with either set analysis or an IF statement. So, for example:


max(if(sum(Revenue)>0,month)


The following set analysis should also work:


max({<month={"=sum(Revenue)>0"}>} month)


Regards,