Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi folks,
I have a straight table in Qlikview which I want to show all the purchase orders raised in the last 7 days. The expression reads like this:
=Sum({<[Purchase Order Date]={'>=$(=WeekStart(Today()))<=$(=Today())'}>} [Purchase Order Line Cost])
This does almost exactly what I want it to do, except that NPrint publishes the report on a Friday, meaning it will only show purchase orders raised since Monday; it won't show purchase orders raised over the weekend.
How do I get the expression to show purchase orders raised in the last 7 days exactly?
Thanks in advance.
I figured it out. The solution was to create a variable called "v7DatesAgo", defined as "=date(Today()-7)".
The expression then reads
=sum({<[Purchase Order Date] = {'>=$(v7DatesAgo)'}>}[Purchase Order Line Cost])
This did exactly what I needed it to do.
Hi @FionnM ,
You can try this,
In Main section, you can change the statement like this
SET FirstWeekDay=5,
it will show the Date from Saturday onwards,
Thanks
Is this in Qlikview or QlikSense?
It's same for both.
Thanks for the suggestion. I think that would do the trick for this specific table, but I have other tables in the same app for which I need the first day of the week to be Monday.
I figured it out. The solution was to create a variable called "v7DatesAgo", defined as "=date(Today()-7)".
The expression then reads
=sum({<[Purchase Order Date] = {'>=$(v7DatesAgo)'}>}[Purchase Order Line Cost])
This did exactly what I needed it to do.