Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
mayuranp
Creator
Creator

In Qlikview, Find no of stores that have achieved the budget

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
6 Replies
Anil_Babu_Samineni

Single Quote should work, May be share full expression?

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
mayuranp
Creator
Creator
Author

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

mayuranp
Creator
Creator
Author

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.

Kushal_Chawda

you can user single quote in inner set

count({<StoreNo={"=sum( {<DayNo={'<=$(vYesterday_DayNo)'}>}SalesAmount)> sum( {<FYea

its_anandrjs

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

Anil_Babu_Samineni

If you create variables in script. you have to define = sign of before to the variable in set operator

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)