4 Replies Latest reply on Feb 16, 2018 10:13 AM by mafalda.santos

# Need help calculation on Max Date

Hi all,

This is my original text table

If my cell is null is showing previous value:

But now I need to create a calculated field that show only the values for Max Month like image bellow dinamically:

I used this formula :

IFNULL(SUM(iif([Date]={MAX([Date])},[Values],NULL)),PREVIOUS_VALUE(SUM([Values])))

But its not working.

Instead Area B=327,2 Tableau is sum all values on that row(453.1+327.2)=780.

The purpose of isolate Max Month it´s because the client wants to see only 2 collumns: One collumn with Max Month and another with diference between Max Month and Previous. Besides the second text table that I showed.

Please if anyone can Help on this issue will be much appreciated ?

Regards,

Mafalda

• ###### 1. Re: Need help calculation on Max Date

Hi

is this what you client wanted to see?

calculated the difference as

then created the viz

Jim

If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

1 of 1 people found this helpful
• ###### 2. Re: Need help calculation on Max Date

Hi Jim,

The only issue is that Max Date needs to be automatic. Because when more data is entered the MAX Date will change.

Do you see other way instead of hiding the dates that are not Max ?

Thanks for the help so far.

Much appreciated.

Mafalda

• ###### 3. Re: Need help calculation on Max Date

Hi have you tried it with another data set

keep a date filter in context - you max date calculation already get you the last date

Jim

1 of 1 people found this helpful
• ###### 4. Re: Need help calculation on Max Date

Hi Jim,

But if you noticed on the left text table using the Max(date) values change.

Thats the main issue the values should remain with the original condition:

ifnull(SUM(([Value])), PREVIOUS_VALUE(SUM([Value])))

Regards,

Mafalda