Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I have a requirement when i select two years then kpi should display value for example i'm trying like this,
if(Year='2018' and Year='2019',1,0)
but it is not working ,It is giving 1 only when one of the year is selected from both ,But i want 1 as output when both the years are selected .Please share your views on this .
Is this in a join object?
If so your expression will not work because using Year like that is same as using Only(Year) which mean s it will return value only if one value is possible.
So you will need to use something like below
getselectedcount(Year)=2 and match(concat(year), 2018, 2019)
Typiing on phone so unfortunately can't give exact syntax
Hi!
It is not working .
edit:
change to
getselectedcount(Year)=2 and match(concat(distinct Year,','), '2018,2019')
Regards
i am giving expression like this :
If(GetSelectedCount(Year)=2 and Match(Concat(Year,','),'2018','2019'),1,0) ,Now i removed the single quotes and it is working
Can you please know me y it is not working if i giving single quotes for the year
Thanks
Sowmya
if you give string like this '2018,2019' it will work because match function checks for whole string. and output of concat is 2018,2019
you could use wildmatch as well like below. this is similar to match but also takes wildcards
e.g.
WildMatch(Concat(Year,','),'*2018*','"2019*')
mark as answered and close the thread. if its cleared up