Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I'm brand new to qlikview and coding in general. I'm trying to figure out how to have a bar chart that shows only one week of data.
Currently I'm using 'WRK_APP_SOURCE' as the current dimension to display whether the source is apple or windows (a grouped chart)
I have 3 expressions which are: 'Compliant', 'Non-Compliant', and 'Total' so there are 3 bars per source = six bars in total grouped by Apple and Windows.
I have another field in my data called 'Login_Date'. I want to be able to restrict the chart by the log in date being within the last 7 days. How would I do that?
Thanks in advance.
Did you try the expression i sent in my previous document i attached. ? This one
= Count({< WRK_STATUS = {3} >} IF(LoginDate >= Date(Today()-6 , 'MM/DD/YYYY') AND LoginDate <= Date(Today(), 'MM/DD/YYYY'), WRK_STATUS))
=Sum({<Login_Date = {">=$(=Date(Today()-6,'MM/DD/YYYY'))<=$(=Date(Today(),'MM/DD/YYYY'))"}} Compliant)
=Sum({<Login_Date = {">=$(=Date(Today()-6,'MM/DD/YYYY'))<=$(=Date(Today(),'MM/DD/YYYY'))"}} Non-Compliant
=Sum({<Login_Date = {">=$(=Date(Today()-6,'MM/DD/YYYY'))<=$(=Date(Today(),'MM/DD/YYYY'))"}} Total)
……………………………….
hm, this would work, but for my current expressions there are already calculations:
For example-
Compliant:
COUNT( IF(WRK_STATUS = 3,WRK_STATUS))
how would I combine the two? thanks.
In Allu's script replace Complaint with your calculated expression. Like.May be try this?
=Sum({<Login_Date = {">=$(=Date(Today()-6,'MM/DD/YYYY'))<=$(=Date(Today(),'MM/DD/YYYY'))"}} COUNT( IF(WRK_STATUS = 3,WRK_STATUS)))
Doing this removes the entire bar
Can you try this?
= Count({<Login_Date = {">=$(=Date(Today()-6,'MM/DD/YYYY')) <=$ (=Date(Today(),'MM/DD/YYYY'))"} >} IF(WRK_STATUS = 3,WRK_STATUS))
pls have a look on this
Thank you. When I add this line to the script and then change the expression it still shows blank.
LOAD *,
Date(Num(Floor(WRK_SCCM_APP_LOGIN_DATE)), 'MM/DD/YYYY') AS LoginDate;
Did you try the expression i sent in my previous document i attached. ? This one
= Count({< WRK_STATUS = {3} >} IF(LoginDate >= Date(Today()-6 , 'MM/DD/YYYY') AND LoginDate <= Date(Today(), 'MM/DD/YYYY'), WRK_STATUS))