Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello experts,
I am new to Qlik view and
I am trying to restrict data for last 31 days data from max date. Actually date field is time stamp and converted that into date by floor function and used it in expression like below.
=Count({<[DateOnly]={">=$(=Date(Max([DateOnly])-30))<=$(=Date(Max([DateOnly])))"} >} DISTINCT [Visitor ID])
But it is giving complete data and not able to restrict 31 days data.
Regards,
Nanda
put
Max(DateOnly)
and
Date(Max([DateOnly])-30)
into a textbox and see what they are returning
hth
Sasi
it is returning 12/31/2020
and 12/1/2020
Regards,
Nanda
there is your problem.. you can not just minus 30 from the date without considering the month and year changes
I suggest you use
addmonths(Max(DateOnly),-1)
instead of Max(DateOnly)-30
hth
Sasi
Can you look into this screen shot.
Sorry, I misread the date format.. try
=Count({<[DateOnly]={">=$(=Date(Max([DateOnly])-30, 'M/D/YYYY'))<=$(=Date(Max([DateOnly]), 'M/D/YYYY'))"} >} DISTINCT [Visitor ID])
No Use sasidhar.
Regards,
Nanda
Dear Nanda,
The only option is you export a sample data from your application and try to replicate the same issue in sample file and share with us.
Without which it will be difficult to understand your issue.
Regards,
Kaushik Solanki