Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to show data from the past 7 days only.
I currently have
sum({<Date={">=$(WeekStart( Today()-7))<$(=today()))"},[Customer] = >}
date([Paid in full date])
-
date([Invoice date])
) / Count( {<Date={'>=$(WeekStart( Today()-7))'},[Customer] = >}Count)
But the above literally does nothing, its the same as if I didn't put in the time parameters. I tried testing the bottom count(Count)
part to see if my date limitations even worked, and even just the bottom part doesn't change (17 records normally, still 17 after putting the limitation on).
Any ideas?
As you can see, the Average days to pay is the same in both scenarios. The top chart doesn't have the date limitations in the set expression.
Your set expression needs to reference actual fields...
sum({<[Paid in full date]={">=$(=WeekStart( Today()-7))<$(=today())"},[Customer] = >}
date([Paid in full date])
-
date([Invoice date])
) / Count( {<[Invoice date]={'>=$(=WeekStart( Today()-7))'},[Customer] = >}Count)
Date={">=$(=WeekStart( Today()-7))........
Try This
sum({1<Date={">=$(=WeekStart( Today()-7))<$(=today())"},[Customer] = >}
date([Paid in full date])
-
date([Invoice date])
) / Count( {1<Date={'>=$(=WeekStart( Today()-7))'},[Customer] = >}Count)
sadly didn't work
Also, it has been red underlined this whole time but it says expression OK at the top
try this
sum({<Date={">=$(=WeekStart( Today()-7))<$(=today())"},[Customer] = >}
date([Paid in full date])
-
date([Invoice date])
) / Count( {<Date={'>=$(=WeekStart( Today()-7))'},[Customer] = >}Count)
It didn't work says expression OK, but all the code is underlined red (it was before as well), and no difference in the chart.
It didn't work says expression OK, but all the code is underlined red (it was red before as well), and no difference in the chart.
Please check your Date field name. It's name is really "Date". Looks ike this date field is not available in your model
What do you mean date field? I don't have a date table in my code, I am subtracting the Paid in full date from Invoice date, both which are tables in my code
Your set expression needs to reference actual fields...
sum({<[Paid in full date]={">=$(=WeekStart( Today()-7))<$(=today())"},[Customer] = >}
date([Paid in full date])
-
date([Invoice date])
) / Count( {<[Invoice date]={'>=$(=WeekStart( Today()-7))'},[Customer] = >}Count)