Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
NavinReddy
Creator II
Creator II

month i got the same results

!Dear Experts,

Please help me below if condition i'm not getting exact Month selection filters

for all the months i'm getting exact same result, please suggest me where im doing wrong

   vMonth: =if(len(GetCurrentSelections()),max(MonthYear),MonthStart(Today()))

=if(Date($(vMonth),'MMM YY'),      if ((RAG_RATING_CD) = 'R', 'Tier1',

                                                  if ((RAG_RATING_CD) = 'A', 'Tier2',

                                                  if ((RAG_RATING_CD) = 'G', 'Tier3'))),

                            

if(Date($(vMonth)-10,'MMM YY'),    if ((RAG_RATING_CD) = 'R', 'Tier1',

                                                    if ((RAG_RATING_CD) = 'A', 'Tier2',

                                                    if ((RAG_RATING_CD) = 'G', 'Tier3'))),

                            

if(Date($(vMonth)-50,'MMM YY'),   if ((RAG_RATING_CD) = 'R', 'Tier1',

                                                  if ((RAG_RATING_CD) = 'A', 'Tier2',

                                                  if ((RAG_RATING_CD) = 'G', 'Tier3'))))))

Best Regards,

Niranjan

1 Solution

Accepted Solutions
t_chetirbok
Creator III
Creator III

check app once again!

View solution in original post

18 Replies
sunny_talwar

I see a if statement, but no comparison?

Capture.PNG

What is $(vMonth) getting compared to? Today() or something else?

Ralf-Narfeldt
Employee
Employee

Yes, the expression that is being evaluated is Date($(vMonth),'MMM YY'), and if that always returns a non-zero value, that will mean TRUE everytime. 

NavinReddy
Creator II
Creator II
Author

Hi Sunny,

thanks for your reply

if can i select Month=Jan16

i will compare &(vMonth) automatically Dec15, Nov15

but im getting three months(Jan16,Dec15,Nov15) same values

any suggestions

Best Regards,

Niranjan

NavinReddy
Creator II
Creator II
Author

Hi Ralf ,

Any suggestion on above error

Regards,

Niranjan

NavinReddy
Creator II
Creator II
Author

Hi Sunny,

Here is the comparison im calculating 

=if(Date($(vMonth),'MMM YY'),

=if(Date($(vMonth)-10,'MMM YY'),

=if(Date($(vMonth)-50,'MMM YY'),

Best Regards,

Niranjan

NavinReddy
Creator II
Creator II
Author

Dear Experts Good Morning,

Any suggestions

i have tried with different ways but im not getting

based on MonthYear selections for three months im calculating the Tiers

But all months im getting the same result

Thanks in Advance

Niranjan

Ralf-Narfeldt
Employee
Employee

Can't see how your solution works, but you need to replace Date($(vMonth) with a condition that doesn't evalute as TRUE every time, which I think it does today.

NavinReddy
Creator II
Creator II
Author

Hi Ralf,

i have attached sample document for your reference

can you please check if im doing wrong in some where

Thanks,

Niranjan

Digvijay_Singh

Check the output of pieces of expression like Date($(vMonth)-10,'MMM YY') in text box and check if it is showing results as expected.

Also you may provide more facts about the problem like what results it shows when you select something and when you don't select something.