Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression returns a - rather than figure expected

Hi

I have a report I am trying to produce that shows our current stocks, packaging stocks and sales forecast.

I have setup a variable to give me current month which in my expression I divide by 4.3 to give me the forecast in weeks but for some reason it returns a -.

I've checked the link between the 2 tables and I can't see anything wrong there. If I just interrogate the forecast data I can return a figure which is correct but not using the variable.

It's going to be something simple but for the life of me I can't see what it is.

I've attached screenshots of the script and expressions etc. Any pointers in the right direction would be greatly appreciated.

QV1.JPG

QV2.JPG

QV3.JPG

QV4.JPG

QV5.JPG

Thanks Steve.

1 Solution

Accepted Solutions
Anil_Babu_Samineni

Image showing Variable as CurrentMonth not the vCurrentMonth

Try with it

Sum({<Month = {'$(=CurrentMonth)'}>} Forecast)/4.3


Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

9 Replies
sunny_talwar

May be try this:

Sum({<Month = {'$(=vCurrentMonth)'}>} Forecast)/4.3

hector_munoz
Specialist
Specialist

Hi Steve,

Maybe the problem is in the set analysis of the expression... Try this expression:

Sum({$<Month={$(#vCurrentMonth)}>} Forecast) / 4.3

I hope it serves...

Regards,
H

Anonymous
Not applicable
Author

Hi Steve,

Your Variable is called CurrentMonth but your set analysis is for vCurrentMonth.

Not applicable
Author

Sorry that didn't change anything still showing -

Not applicable
Author

Sorry that didn't change anything, still showing -

sunny_talwar

Can you check without the variable?/

Sum({<Month = {'$(=Month(Today()))'}>} Forecast)/4.3

Anil_Babu_Samineni

Image showing Variable as CurrentMonth not the vCurrentMonth

Try with it

Sum({<Month = {'$(=CurrentMonth)'}>} Forecast)/4.3


Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
tresesco
MVP
MVP

Should your variable be vCurrentMonth rather than vCurrentMonth ?

Not applicable
Author

Thanks Anil, that worked.

Regards Steve