- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If..THEN..ELSE - Date and Quarter
Hi All,
Trying to implement the following logic in Qlikview
If date = 1 quarter from current quarter then [type] = "A"
If date = 2,3,4 quarters from current quarter then [type] = "B"
If date > 5 quarters from current quarter then [type] = "C"
Here "date" format is "dd/mm/yyyy" and "current quarter"
format is "2017-Q1"
Can you please advise on how to create this calculation ?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May be this:
If(QuarterStart(Date) = QuarterStart(Today()),
If(Day(Date) = 1, 'A','
If(Day(Date) <= 4, 'B', 'C')))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry this did not work.
Have issue with the format conversions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Date format you mean? May be try this:
If(QuarterStart(Date#(Date, 'DD/MM/YYYY')) = QuarterStart(Today()),
If(Day(Date#(Date, 'DD/MM/YYYY')) = 1, 'A','
If(Day(Date#(Date, 'DD/MM/YYYY')) <= 4, 'B', 'C')))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks.
For today() I have a field of the format "2014-Q2".
How can I substitute this in today () ?
This part is not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Substitute today with a field? Why would you do that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a filter and data from that is to be compared
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Would you be able to share a sample as I am not sure I understand what you have and what you are hoping to get out of it