Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have the following expression in a chart, which members here told me would only show data from the past 7 weeks
sum({<[Paid in full date]={">=$(=Date(Today()-7))<=$(=Date(Today()-1))"},[Customer] = >}
date([Paid in full date])
-
date([Invoice date])
) / Count( {<[Paid in full date]={">=$(=Date(Today()-7))<=$(=Date(Today()-1))"},[Customer] = >}Count)
However, I want to test with data in the last 6 days, so I replaced the 7 with a 6, but nothing appeared.
Here are my dates
Any ideas?
Paid in full date = Invoice date between 6/14/2017 and 6/19/2017 making the numerator = 0
May be try this:
One small suggestions do not ever use the native QV functions names as your column names. Just want to confirm the one colored in red below is that your Field name Count can you rename that field QV thinks that as a native function. I would not use any native function names as my field names.
Try this:
= sum({<[Paid in full date]={">=$(=Date(Today()-7, , 'MM/DD/YY'))<=$(=Date(Today()-1, 'MM/DD/YY'))"},[Customer]= >} date([Paid in full date]) - date([Invoice date]))/
Count({<[Paid in full date]={">=$(=Date(Today()-7, , 'MM/DD/YY'))<=$(=Date(Today()-1, , 'MM/DD/YY'))"},[Customer]= >} Count)
so I replaced the 7 with a 6, but nothing appeared.
What do you mean here? what did not appear? Can you share a sample?
Okay I have changed my Count table to Payment_count.
I implemented the change you suggested, but now it looks the same as my chart with
sum({<[Customer] = >}
date([Paid in full date])
-
date([Invoice date])
)/ Count( {< [Customer] = >}Payment_count)
which is the original without any date constraints
OK, so you still have the issue? With your first expression?
Right, it now seems to show all data regardless of date.
Is there something wrong with my syntax? Are the Date and Today supposed to be blue?
Using a line chart, it says no data to display. But there should be, because as you can see in my date range, there is data from 5 to 6 days ago.
Dates are visible, yes. But do you have count (or new Payment_count) associated with all dates? May be the rest of the 6 days have null count?
You have an extra comma in the Date. It should be like
">=$(=Date(Today() -5, 'MM/DD/YY'))
My bad.
May be use this?
= sum({<[Paid in full date]={">=$(=Date(Today()-7, 'MM/DD/YY'))<=$(=Date(Today()-1, 'MM/DD/YY'))"},[Customer]= >} date([Paid in full date]) - date([Invoice date]))/
Count({<[Paid in full date]={">=$(=Date(Today()-7, 'MM/DD/YY'))<=$(=Date(Today()-1, 'MM/DD/YY'))"},[Customer]= >} Payment_Count)
I just checked, and Payment Count is associated with everything. Payment count is just a count of all the records in my data file, so it is associated with literally everything in my data set