Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
having a problem with my syntax below.
My default state is where I have the most recent month selected - see image.
I'm trying to go back 12 months to grab a value from a year ago from my default state.
I have the below expr linked to alternate state which is not working.
=sum({< %Snapshot_Date = {"$(=addmonths($::%Snapshot_Date,-12,1))"} >} Headcount)
What am I missing ?
Thankx !
Gerry.
QlikView is case sensitive and you date field is called date1 and not Date1 (see the upper case D vs lower case d)..
This worked
=Sum({<emptype={'PT'}, date1 = {"$(=Date(AddMonths(Only({$} date1), -12), 'MM/DD/YYYY'))"}>}sales)
whereas this didn't
=Sum({<emptype={'PT'}, Date1 = {"$(=Date(AddMonths(Only({$} Date1), -12), 'MM/DD/YYYY'))"}>}sales)
Why are you looking expression? Instead of that we have always one selected value right. You can go for Alternate state as mention
Anil:
You are not understanding the problem.
I'm trying to reference a date in default state going back 12 months, in another alternate state.
It's a syntax issue I'm facing.
Gerry.
Oh, I apologizes for that, Can you share application to look
Hi anil
see attached.
change the date to 4/30/16, 4/30/17.
So your object where your referring to the above expression has an alternate state ? if yes then it will be seeking the selection to be in the alternate state mode so this is the syntax
Function({[state_identifier1] <field_name2= [state_identifier2]::field_name3>}field_name)
in your expression I could not see the state 2
sum({< %Snapshot_Date = {"$(=addmonths($::%Snapshot_Date,-12,1))"} >} Headcount)
Like this?
HI Anil:
my source state is the default state $.
I'm assigning this in text box which is my "to" state, isn't it implied ?
Do you follow the same Which Avinash provide the syntax in between the Operator <AlterNateState{