7 Replies Latest reply on Aug 7, 2018 1:39 AM by Ankit Bansal

# Display the Amount based on the data available of latest year

Hi,

I have data set like

and I would like to display result like

Belarus .87B

Brazil 41.1.B

Switzerland 17.69B

Unites States of America 511.09B

Thanks

• ###### 1. Re: Display the Amount based on the data available of latest year

Hi,

You may try this,

If you don't get expected result then using IFNULL([Your Measure],0) >0 you can try to handle the null values.

Let us know if this help else share some sample workbook.

Mahfooj

• ###### 2. Re: Display the Amount based on the data available of latest year

Hi Sundeep,

You can try below logic:

1. if year([Year])=({FIXED [Country]: max(year([Year]))}) then [Sales] END

This logic is calculating the max year for each country and then if max year =year it will display the sale.

• ###### 3. Re: Display the Amount based on the data available of latest year

This should work.

Create a calculated field as below and put it on filter shelf and choose TRUE.

[year] = {fixed [country] : max(if  not isnull([sales])  then [year] end )}

1 of 1 people found this helpful
• ###### 4. Re: Display the Amount based on the data available of latest year

Hi Mahfooj,

Thanks a lot for the solution. It worked

• ###### 5. Re: Display the Amount based on the data available of latest year

Hi Ankit,

Thanks a lot for the solution. It worked

• ###### 6. Re: Display the Amount based on the data available of latest year

Hi Meenu,

Thanks for the solution. In data set there are few null values also. It worked with little change in the formula

• ###### 7. Re: Display the Amount based on the data available of latest year

Great. Can you then close the thread by marking the answer as correct.