Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
mrbqlik2009
Contributor III
Contributor III

how to use variable value in double quotation

Hi,

I have an expression such as this:

sum({<SaleCalendarYear={$(vPreviousYear)},SaleMonthNumberOfYear={">=2<=2"}, SaleDayNumberOfMonth={">=1<=$(=vTodayDay)"}>} Price+Discount)

I use variable vTodayDay  in double quotation.


but it not work.


How can i get variable value in double quotation?

5 Replies
vishsaggi
Champion III
Champion III

What is the value you have in your vTodayDay? May be try like

= sum({< SaleCalendarYear      = {$(vPreviousYear)},

         SaleMonthNumberOfYear = {">=2<=2"},

         SaleDayNumberOfMonth  = {"=$(='>='&1&'<='&$(vTodayDay))"}>} Price+Discount)

OR

Just try

= sum({< SaleCalendarYear      = {$(vPreviousYear)},

         SaleMonthNumberOfYear = {">=2<=2"},

         SaleDayNumberOfMonth  = {">=1<='$(vTodayDay)'"}>} Price+Discount)

mrbqlik2009
Contributor III
Contributor III
Author

Thanks for your answer, but it not work.

vTodayDay is a number between 1 to 31.

vishsaggi
Champion III
Champion III

Is it possible to share your app you are trying this on for a quick look?

mrbqlik2009
Contributor III
Contributor III
Author

I solved the problem. Thank you.

vishsaggi
Champion III
Champion III

Ok. Can you post the solution and mark yours as correct and close the thread.