Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Displaying field when max date condition is met

Hi Folks,

I am writing expression  to display  field  when the max date is condition is met .

However it isn't working. Any help would be  highly appreciated.

if(RDate=Max(RDate),[VAR_CRNCY_UNITS])

Regards

Varghese

6 Replies
its_anandrjs

Try to create the variable and then use

Let vMaxVal = Max(RDate);


if( RDate = $(vMaxVal), [VAR_CRNCY_UNITS] )


Or


if(RDate = Maxstring ( RDate ) , [VAR_CRNCY_UNITS])



Regards

Anand

jerem1234
Specialist II
Specialist II

Are you making selections on RDate? Try:

if(RDate=Max({1}RDate),[VAR_CRNCY_UNITS])


If this doesn't work, can you explain your situation a bit more? What chart are you using this in? What kind of selections are you making?


Even better, post an example demonstrating your problem if that's possible.


Hope this helps!

prieper
Master II
Master II

You need to bring in aggregation of your units, e.g. SUM:

SUM(IF(RDate = MAX(RDate), [Units])

The above may work, if there is just one value available for Units.

HTH Peter

kushalthakral
Creator III
Creator III

Dear Varghese

do you want to make this requirement as conditional one

Regards

Kushal T

Not applicable
Author

Hi ,

I have  and excel   sheet with three fields RLIST_Date,FXD_CRNCY_CODE,VAR_CRNCY_UNITS.  With RLIST as the Date Dimension and  FXD_Crncy_code  with values USD,EUR,JPY etc  I am trying to build straight table with  Currency Code and the Exchange rate   as per the data given.  The last record that I have is for  24-10-2014  so would want to display the  Currency code and the exchange rate for that period and also would want to display it for the previous day so  that we show the variance.

Thanks for the  all the response.

regards

Varghese

Not applicable
Author

The requirement is to have  straight table  displaying the currency and the exchange rate for the max date for data set.