Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a textbox that shows the value accordingly based on the year i hardcoded in.
=count({1<[DTO Year]={"2019"},[YTD DTO]= {">=45"}>}DISTINCT [Customer])
Currently, i'm trying to display it when user select the year but can't get it right.
When no selection, display the max year, else display the value accordingly. if(GetFieldSelections ([DTO Year]) = '2016',
count({<[YTD DTO]= {">=45"}>}DISTINCT [Customer]),
if(GetFieldSelections ([DTO Year]) = '2017',
count({<[YTD DTO]= {">=45"}>}DISTINCT [Customer])))
Hi ,
This seems to be working:
=count({1<[DTO Year]={$(vMonth)},[YTD DTO]= {">=30 <45"}>}DISTINCT [Customer])
Pfa sample: check the text box, it shows the expected number on selecting years
Br,
KC
Also tried =count({$<[DTO Year]=,[YTD DTO]= {">=45"}>}DISTINCT [Customer])
Means if DTO year is ? (2016, 2017, 2018 or 2018) and YTD DTO is more than or equal to 45 then show the respective result.
Hi DestinedTale,
May be try like this:
Create a variable:
vMonth = if(GetSelectedCount([DTO Year])=0,max([DTO Year]),Concat(distinct chr(39)& [DTO Year] & chr(39),','))
No use this expression:
=count({1<[DTO Year]={$(vMonth)},[YTD DTO]= {">=45"}>}DISTINCT [Customer])
Br,
KC
encounter this error while texting in textbox
Error: Error in set modifier ad hoc element list : ',' or ')' expected
Can you please share a sample qvw ?
You have to add and "=" before the expression while declaring the variable.
Br,
KC
attached a sample.
Textbook with 13 is the expression where i used to hardcode the year to 2019.
When select the year, your expression does not show the correct values.
Hi, added the = but still doesn't work.
Hi ,
This seems to be working:
=count({1<[DTO Year]={$(vMonth)},[YTD DTO]= {">=30 <45"}>}DISTINCT [Customer])
Pfa sample: check the text box, it shows the expected number on selecting years
Br,
KC