Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT

Re: qsVariable

Ok,

My expression is correct. What you have done is you have copied and pasted the exact expression from my post where "" marks were changed to some other characters (note difference between "" and “”)

So once again use this formula from below and it will work!

Sum({<Dim = {"=Sum(Fact)$(vSum)"}>} Fact)

cheers Lech, 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 to the problem.

View solution in original post

Re: qsVariable

I also would add anther variable which would control sign just to avoid any issues with syntax...

Attached is my sample app.

Hope this helps

1.png

cheers Lech, 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 to the problem.

View solution in original post

mbjallow6
New Contributor II

Re: qsVariable

Thank you so much for the support.

I have finally worked as i wanted.

Highlighted
mbjallow6
New Contributor II

Re: qsVariable

the previous solution have worked just fine. However, i am faced by a more complex requirement.

from the previous solution how can i improve on the syntax in order for the user to be able to enter ">1000 <2000" that is to say greater than 1000 but less than 2000. Furthermore, how can i make sure that only data within the past 12 month is filter.

Thank you in advance.

 

Re: qsVariable

Hi,

you need to create another variable as your condition cannot exist in single variable... and embed it in your extended expression.

 

Expression will look like this (note * union character between sets):

Sum({<Dim = {"=Sum(Fact)>$(vSum)"}*{"=Sum(Fact)<$(vSum2)"}>} Fact)

or when using additional variable for <= sign.....

Sum({<Dim = {"=Sum(Fact)$(vSign)$(vSum)"}*{"=Sum(Fact)$(vSign2)$(vSum2)"}>} Fact)

 

Regarding your "Last 12 Months" question there are multiple ways of achieving the same:

  • Users need to apply selections direcly in Qlik Sense
  • You can harcode Last 12 months in set analysis expression (given that you have properly loaded and formatted date field) like this: Sum({<Date={">=$(=AddMonths(Today()-12))<=$(=Today())"},Dim = {"=Sum(Fact)$(vSign)$(vSum)"}*{"=Sum(Fact)$(vSign2)$(vSum2)"}>} Fact)
  •  You can create Last 12 months flag in script calendar and use flag as selection or in set analysis

1.png

Regarding your "Last 12 Months" question....This was very basic question you asked and I really suggest you learn little bit of Qlik Sense first before asking them (go through help.qlik.com (text and videos), go through blogs etc.. or even get a basic 5 day training from Qlik Partner or Qlik) .

I do not want to be harsh but i think there needs to be a minimum level of knowledge when we discuss things here.

Attached is document with all options implemented!

cheers Lech, 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 to the problem.

View solution in original post

mbjallow6
New Contributor II

Re: qsVariable

Thank you.

well regarding the last 12 months question, maybe i have not framed the question well. because already i know how to filter the last 12 months data. the issue i have actually is i am using about 5 measures in one bar chart. and there are times that some of the measures will not have data and the dimension field will still appear without any bar against it.

so what i wanted to achieve is any time that a filter is performed, if a particular measure does not have data, then the rest of the other measure should not appear.

I am sorry for any inconvenience. I am new in qlik but i am determine to learn. i have a qlik continues classroom account also i have subscribe to most qlik channels on youtube. 

Re: qsVariable

Hi,

I see,

this is then different topic and you should open different topic/question for it as on community we try to stick to subjects and dont jump from one to another questions within the same thread.

cheers

 

cheers Lech, 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 to the problem.