Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
In Qlikview, I am trying to get no of stores that have achieved budget for this year to date.
I run the report every day morning for the year upto end of yesterday.
The expression below is not working due to double quotes within double quotes.
I tried replacing inner double quotes with single quotes but no luck.
Any suggestions / ideas?
count({<StoreNo={"=sum( {<DayNo={"<=$(vYesterday_DayNo)"}>}SalesAmount)> sum( {<FYea
Single Quote should work, May be share full expression?
This is full expression
=count({<StoreNo={"=sum( {<SalesEntryType={'Sales'},FYear={$(vYesterday_Year)},FPeriod={$(vYesterday_PeriodNo)},DayNo={<=$(vYesterday_DayNo)}>}SalesAmount)<
sum( {<FYear={$(vYesterday_Year)},FPeriod={$(vYesterday_PeriodNo)},DayNo={'<=$(vYesterday_DayNo)'}>}[Budget Amount])"}>}StoreNo)
Returns 0 always
I create the variables in script and then use them in chart expressions.
When I write the full expression in the chart, it works as you mentioned. However, storing the the expression in the variable for this is not working.
Anyway, I have a workaround now.
Here is the full expression that works in the chart:
=count({<StoreNo={"=sum( {<SalesEntryType={'Sales'},FYear={$(vYesterday_Year)},FPeriod={$(vYesterday_PeriodNo)},FYearName,Date,DayNo={'<=$(vYesterday_DayNo)'}>}SalesAmount)>
sum( {<[Gen Prod Posting Group Code],[Misc Brands],[Dont Show on Analysis Screen],[Hour],FYear={$(vYesterday_Year)},FPeriod={$(vYesterday_PeriodNo)},FYearName,Date,DayNo={'<=$(vYesterday_DayNo)'}>}[Budget Amount])"}>}StoreNo)
Can this be stored as a variable in script?
Thanks.
you can user single quote in inner set
count({<StoreNo={"=sum( {<DayNo={'<=$(vYesterday_DayNo)'}>}SalesAmount)> sum( {<FYea
Put Equals symbol before the variable name and with different expression as well as try
count({<StoreNo={"=sum( {<DayNo={"<=$(=vYesterday_DayNo)"}>}SalesAmount)> sum( {<FYea
Or
count({<StoreNo={"=sum( {<DayNo={'<=$(=vYesterday_DayNo)'}>}SalesAmount)> sum( {<FYea
If you create variables in script. you have to define = sign of before to the variable in set operator