Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Qlik Sensers
hre is my problem
i have a bar chart that give number of sending calls per quarter of hour like this :
if a select a particular week ( let say week 7) it's cumulating sending calls per quarter for all the days of the week.
I did first 5 charts for each weekday and then i thought i could manage this with a VARIABLE to select wich day i want to show data per quarter.
I thougt it would be easy ....
I use qsvariable and set variable name vJourSemaine
select render as "button" like that :
then add : add alternative and enter this :
value 0 label Lundi ( monday)
value 1 label Mardi ( Thuesday) etc still friday
Then in my expression I add this :
Count({$<[In/out]={'sortant'},JourSemaine={'$(vJourSemaine)'}>}Teleop)
count number of Teleop where field In/Out is "sortant" and dimension "JourSemaine" (weekday) is equal to my variable
But it does'nt work
What I am doing wrong ?
thanks for help
Bruno
Hi Bruno,
Is the $(vJourSemaine) returning the values as 'lun.' ? I would suggest you to test it with a text object just to make sure that the right value is being returned.
Thanks,
Sangram.
Hi Bruno,
If you replace the variable evaluation by one of the values, 0 for example, does it work?
Count({$<[In/out]={'sortant'},JourSemaine={'0'}>}Teleop)
Hi Cesar
No it does'nt work
It's works with that
Count({$<[In/out]={'sortant'},JourSemaine={'lun.'}>}Teleop)
my dimension Joursemaine is made with this in my script
weekday(date) as JourSemaine // so it's giving lun. mar. mer. jeu. ven. as results
I tried to change my variable by setting
value:
lun.
Label : Lundi
or value 'lun.' but it's not working ...
Bruno
Hi Bruno,
So in that case you have to change the values like you did, you might have to recreate the object to update the variable value or use the variable overview and change it manually.
Cesar
Have you checked the variable-value within a textbox if it returned what you expected. Further helpful might be this: Variables.
Btw. if you would use a listbox on the weekday it would be a lot easier.
- Marcus
Hi Bruno,
Is the $(vJourSemaine) returning the values as 'lun.' ? I would suggest you to test it with a text object just to make sure that the right value is being returned.
Thanks,
Sangram.
Hi all
Thanks for the help
At the end it's working perfectly
adding alternative to my variable like this
value = lun. label Lundi etc till wednesday to have the 5 days of a week lun. mar. mer. jeu. ven. without quote and it's giving me the result needed
Thanks again
Glad it helped!