Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
johnso2080
Contributor
Contributor

Quick Set Analysis Question

I am using this set expression...

[FirstDate Date]=,[FirstDate Day]=,[FirstDate Weekday]=,[FirstDate Year]=,[FirstDate Month]=,[FirstDate Quarter]=,[FirstDate _MonthSerial]=,[FirstDate _QuarterSerial]=,[FirstDate _WeekSerial]=,[FirstDate Year-Month]=,

[FirstDate Date] = {"<=$(=AddYears(Max([FirstDate Date]), -1))"},

[FirstDate Date] = {">=$(=AddYears(Min([FirstDate Date]), -1))"}

It's supposed to give me records related to the currently selected date range minus 1 year. But it is bringing back the whole year. I need the equivalent of a logical AND...

Any ideas?

Thank you

1 Solution

Accepted Solutions
Not applicable

You can try this

[FirstDate Date]=,

[FirstDate Day]=,

[FirstDate Weekday]=,

[FirstDate Year]=,

[FirstDate Month]=,

[FirstDate Quarter]=,

[FirstDate _MonthSerial]=,

[FirstDate _QuarterSerial]=,

[FirstDate _WeekSerial]=,

[FirstDate Year-Month]=,

[FirstDate Date] = {">=$(=AddYears(Min([FirstDate Date]), -1))<=$(=AddYears(Max([FirstDate Date]), -1))"}

E.g. combine those expression in 1 field...

View solution in original post

3 Replies
Not applicable

You can try this

[FirstDate Date]=,

[FirstDate Day]=,

[FirstDate Weekday]=,

[FirstDate Year]=,

[FirstDate Month]=,

[FirstDate Quarter]=,

[FirstDate _MonthSerial]=,

[FirstDate _QuarterSerial]=,

[FirstDate _WeekSerial]=,

[FirstDate Year-Month]=,

[FirstDate Date] = {">=$(=AddYears(Min([FirstDate Date]), -1))<=$(=AddYears(Max([FirstDate Date]), -1))"}

E.g. combine those expression in 1 field...

johnso2080
Contributor
Contributor
Author

Perfect, thanks!

Not applicable

You're welcome. Happy Qliking!