Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello experts,
I have chart in that one date dimension and multiple expressions are there. I want to display last 31 days from max of date.
Can any one suggest me how to do that one.
Regards,
Kumar
count( {$<
[Site Visit Hit Source]=-{5,7,8,9},
[Site Visit Post Page Event] = {0},
[Time Full Date]={">=$(=date(max([Time Full Date])-30, 'MM/DD/YYYY'))"}
>} DISTINCT [Visitor ID])
the order of the function is important
max([Time Full Date]) this is a num
max([Time Full Date])-30 this is a num
date(max([Time Full Date])-30, 'MM/DD/YYYY') this is a MM/DD/YYYY
and if [Time Full Date] is a MM/DD/YYYY it should be ok
No, still i am struggling with this issue.
what is the format of the value in [Time Full Date] ?
and if you put date(max([Time Full Date])-30, 'MM/DD/YYYY') in a text box, do you get the date in the format that matched to Time Full Date?
Hi Kumar,
Try this it gives you last month count from today.
count(if(Time Full Date >= AddMonths(today(),-1),[Visitor ID])) as Last_ Month_VisitorID_Count,
Cheers,
Ganesh
Hi Ganesh,
I should not take today(), because based on the data load I have to take it.
Regards,
Kumar
I got date. Some where it is going wrong. I am new to qlikview and can't figure out exactly.
[Time Full Date ] is time stamp.
try with a date
to get a date from timestamp, in script you can add a field
.....
date(floor([Time Full Date])) as [Full Date]
.....
Can you attach the sample data to demonstrate your issue. It will help the folks to give correct answer instead of guessing answers. Thank you.
Hi,
I think the issue is the Date format in your set analysis expression, in script change like below
LOAD
*,
Date(Floor(DateFieldName)) AS DateOnly
FROM DataSource;
Now use below expression
=Count( {<[Site Visit Hit Source]=-{5,7,8,9},
[Site Visit Post Page Event] = {0},
DateOnly={">=$(=Date(Max([DateOnly])-30))<=$(=Date(Max(DateOnly)))"}
>} DISTINCT [Visitor ID])
Hope this helps you.
Regards,
Jagan.