
Contributor III
2022-06-13
03:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to get quarters in a form of Q1 , Q2 , Q3 and Q4 from a date
How to get quarters in a form of Q1 , Q2 , Q3 and Q4 from a date. A sample formula should help.
Need to use this in a bar chart
Labels (7)
Labels
- Subscribe by Topic:
-
Chart
-
dimension
-
expression
-
filter
-
Set Analysis
-
Variables
-
Visualization
1,605 Views
3 Replies

Creator
2022-06-13
04:01 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i would do this at in script. Nested IF sentense
Table:
Load
Date,
if(date<01.01.2022 and date > 01.03.2022, Q1,
if(date<01.03.2022 and date > 01.06.2022, Q2,
if(date<01.06.2022 and date > 01.09.2022, Q3,
if(date<01.09.2022 and date > 31.12.2022, Q4)))) as quater
From table;
Then in Bar chart add quater in x -axis
-V
1,603 Views


MVP
2022-06-13
04:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You may do it in this way:
'Q' & ceil(month(DATE)/3) as Quarter
- Marcus


Champion III
2022-06-13
04:45 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Creating a separate calendar table would be good
refer below
https://qlikviewcookbook.com/2015/05/better-calendar-scripts/
Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
If a post helps to resolve your issue, please accept it as a Solution.
