Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set expression not working as intended

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

date.png

Any ideas?

21 Replies
Not applicable
Author

Ah. I've come to the conclusion that these are both the same lol

With the MM/DD/YY or without it, it still results in "no data to display" on the line chart

sunny_talwar

Mock up or a sample?

vishsaggi
Champion III
Champion III

Can you share a sample if possible?

Not applicable
Author

Here is QVD. Can't share Customers, thats in another file, but this has dates and count.

Not applicable
Author

This has dates and count, but does not include Customers, as I can't share that.

sunny_talwar

Paid in full date = Invoice date between 6/14/2017 and 6/19/2017 making the numerator = 0

Capture.PNG

Not applicable
Author

I see. So what does this imply? Is there a fix for this? If the difference is 0 between the dates, I want it to stay that way, so are you saying my chart and expression is correct as -is?

sunny_talwar

I don't know what the expectation is, but your expression is working and the only reason you see 0 is because your numerator is 0.

Not applicable
Author

For example, if there are 2 records, the first was paid in 2 days, and the other was paid on the same day aka 0.

So in my Average days to pay chart, I want it to graph 1 day. Is this possible? I believe now it just ignores all 0's and only calculates it if it is 1 or above

sunny_talwar

I think that's what it will do....