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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Karim_Khan
Creator III
Creator III

How to get the First Month of Quarter

Hi Team,

  

    Can we get the First Month of every quarter on the selection of Months?

Regards,

KK

KK
19 Replies
parthakk
Creator II
Creator II

Considering the fiscal period as shown below,

LOAD * INLINE [

    Period, fiscal period ID

    Apr, 1

    May, 2

    Jun, 3

    Jul, 4

    Aug, 5

    Sep, 6

    Oct, 7

    Nov, 8

    Dec, 9

    Jan, 10

    Feb, 11

    Mar, 12

];

try the following expression. Hope it helps you

=only({<Period=,[fiscal period ID]={'$(=(Ceil(vMonth/3)+(2*(Ceil(vMonth/3)-1))))'}>}Period)

Regards,

Partha Kulkarni

MayilVahanan

Hi

May be try like this

=Month(QuarterStart(MakeDate(Year(Today()),vMonth)))

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Karim_Khan
Creator III
Creator III
Author

I wanted to apply this for Fiscal Quarter.It is working as per Indian Quarter.Will it work for Fiscal?

KK
Karim_Khan
Creator III
Creator III
Author

Hi Sir Now Fiscal Quarter is showing correctly by passing the Fiscal Month variable.

and belwo expression is working fine

=Num(Month(QuarterStart(MakeDate(Year(Today()),vCisc)))

Calculation is also getting calculated fro Q1 only

Q1 - Aug-Sep-Oct

But whenever I am selecting Nov then values are getting zero.

KK
parthakk
Creator II
Creator II

Hi Karim,

PFA It works fine for fiscal year(april-march).

Expression shall work for any fiscal year.

Thanks

Partha

sasiparupudi1
Master III
Master III

if you have a year field,


replace

Num(Month(QuarterStart(MakeDate(Year(Today()),vCisc)))


with

Num(Month(QuarterStart(MakeDate(YourYearField,vCisc)))

Karim_Khan
Creator III
Creator III
Author

Hi Sir,

  Your and Ramasawmy sir's expression both are working fine but only for Quarter 1. Aug-Sep-Oct

I want the same needs to be work for Q2,Q3,Q4

While I am clicking on Nov Month values are getting Null.

Regards,

Karim Khan

KK
sasiparupudi1
Master III
Master III

try

Num(Month(QuarterStart(MakeDate(left([Fiscal Period ID],4) ,vCisc)))

Karim_Khan
Creator III
Creator III
Author

where is the attachment

KK
Karim_Khan
Creator III
Creator III
Author

Sir By Applying this Logic.

I'm able to Calculate Q1 and in Q2 only Dec and Jan Data is getting calculated because when am clicking on Nov values are getting Zero.But when clicking on Jan and Dec the QTD is calcultaing Nov=0,Dec and Jan Value.

For Other Quarter still values showing Null.

Pls help I would be very thankfull.

Regards,

KK

KK