Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover the Trends Shaping AI in 2026: Register Here!
cancel
Showing results for 
Search instead for 
Did you mean: 
nikhilgarg
Specialist II
Specialist II

Wrong Financial Year

Hey,

I tried calculating the Quarter value but it doesnot give me correct quarter value.

I am using following as expression:

'Q'& Ceil(if(Month(CreateDate) > 10 , Month(CreateDate) - 10 , Month(CreateDate)+2)/3.0)

And Create Date as Dimension.

Plz help.

tHanks

7 Replies
rubenmarin

Hi Nikhil, try using floor on dates:

'Q'& Ceil(if(Month(Floor(CreateDate)) > 10 , Month(Floor(CreateDate)) - 10 , Month(Floor(CreateDate))+2)/3.0)

nikhilgarg
Specialist II
Specialist II
Author

Hey,

THankx but this also doesnot help. In the image i ahve attached as you can see, One date with Month of april showing Q2 and othe showing Q3. And also Dec Date showing Q1.

Anonymous
Not applicable

Because there are 30 days in april not 31.

Thanks,

UG

rubenmarin

Hi, that date doesn't exists, april has 30 days. I think QV is converting to May-01.

nikhilgarg
Specialist II
Specialist II
Author

lol , my mistake but what when ia m using following expr:

'Q'& Ceil(if(Month(CreateDate) > 10 , Month(CreateDate) - 10 , Month(CreateDate)+2)/3.0)


Then it means i want financial year to start with Oct so except Dec Date all other quarters are going wrong.

nikhilgarg
Specialist II
Specialist II
Author

lol , my mistake but what when ia m using following expr:

'Q'& Ceil(if(Month(CreateDate) > 10 , Month(CreateDate) - 10 , Month(CreateDate)+2)/3.0)


Then it means i want financial year to start with Oct so except Dec Date all other quarters are going wrong.

Anonymous
Not applicable

if you want it to start from oct then change the expression to:

'Q'& Ceil(if(Month(CreateDate) > 9 , Month(CreateDate) - 9 , Month(CreateDate)+3)/3.0)