Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Action-Packed Learning Awaits! QlikWorld 2023. April 17 - 20 in Las Vegas: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
satishkurra
Specialist II
Specialist II

Expression Help on Current Fiscal Quarter

Hi

I generated Fiscal Quarter and Fiscal Month from Calendar.

In same calendar, i generated a FiscalQuarterSerial which defines 1, 2 and 3 as First , Second and Third Month of Quarter.

If(FiscalQuarter='Q1' and FiscalMonth='Oct',1

If(FiscalQuarter='Q1' and FiscalMonth='Nov',2

If(FiscalQuarter='Q1' and FiscalMonth='Dec',3

If(FiscalQuarter='Q2' and FiscalMonth='Jan',1

If(FiscalQuarter='Q2' and FiscalMonth='Feb',2

If(FiscalQuarter='Q2' and FiscalMonth='Mar',3

If(FiscalQuarter='Q3' and FiscalMonth='Apr',1

If(FiscalQuarter='Q3' and FiscalMonth='May',2

If(FiscalQuarter='Q3' and FiscalMonth='Jun',3

If(FiscalQuarter='Q4' and FiscalMonth='Jul',1

If(FiscalQuarter='Q4' and FiscalMonth='Aug',2

If(FiscalQuarter='Q4' and FiscalMonth='Sep',3)))))))))))) as FiscalQuarterSerial

I need to derive an expression on front end as

If it is Current Quarter and First Month of Quarter, it should retrieve expression 1,

If it is Current Quarter and Second Month of Quarter, it should retrieve expression 2,

If it is Current Quarter and Third Month of Quarter, it should retrieve expression 3,

For this I had written expression as

If(QuarterName(Today(),0) = QuarterName(Today(),0) and FiscalQuarterSerial=1,

Expression 1,

If(QuarterName(Today(),0) = QuarterName(Today(),0) and FiscalQuarterSerial=2,

Expression 2,

If(QuarterName(Today(),0) = QuarterName(Today(),0) and FiscalQuarterSerial=3,

Expression 3)))

However it is not working

I assume this is not working as current selection on front end is not on FiscalQuarterSerial

Is there anyway to achieve this

The primary idea is to generate different expression depending upon the First, Second and Third Month of Current Quarter

Please help

Thanks

Satish

1 Solution

Accepted Solutions
satishkurra
Specialist II
Specialist II
Author

This is fixed..

Adding logic for any reference.

Instead of FiscalSerial, i added logic in expression as

=if(Month(Today())='Oct' or Month(Today())='Jan' or Month(Today())='Apr' or Month(Today())='Jul',

Expression1,

if(Month(Today())='Nov' or Month(Today())='Feb' or Month(Today())='May' or Month(Today())='Aug',

Expression2,

if(Month(Today())='Dec' or Month(Today())='Mar' or Month(Today())='Jun' or Month(Today())='Sep',

Expression3)))

Assuming Oct, Jan, Apr and Jul is always 1st Month of quarter, Nov, Feb, May and Aug is always 2nd Month of quarter and so on....

View solution in original post

13 Replies
satishkurra
Specialist II
Specialist II
Author

Any ideas?

Anil_Babu_Samineni

May be this?

If(QuarterName(Today()) and FiscalQuarterSerial=1, Expression 1,

If(QuarterName(Today()) and FiscalQuarterSerial=2, Expression 2,

If(QuarterName(Today()) and FiscalQuarterSerial=3, Expression 3)))

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
satishkurra
Specialist II
Specialist II
Author

Hi Anil

Thanks for the response.

Not working.

Also QuarterName(Today()) will give Apr-Jun 2017 and FiscalQuarterSerial is 1.

May be that is why it is not working..

Thanks

Satish

Anil_Babu_Samineni

Yes, Here what are expecting instead of Apr-Jun 2017 ??

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
satishkurra
Specialist II
Specialist II
Author

This is what I'm looking for

Derive 3 different expression depending upon the First, Second and Third Month of Current Quarter.

Anil_Babu_Samineni

Can you provide static whether how you want to create Field

If ( Jan = 'Jan', ....) Something like this?

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
satishkurra
Specialist II
Specialist II
Author

Hi

Didn't get exactly.

How about getting value from FiscalQuarterSerial Listbox. It is retrieving 1, 2 and 3 every time.

Is there a way to derive values from this?

Thanks

Satish

Anil_Babu_Samineni

I am sorry, I may not follow you. Would you able to share sample application with inline memory and if you know about expected result please mention that

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
satishkurra
Specialist II
Specialist II
Author

PFA

I removed other stuff, but you can see text box where i need help.

Also in back end you can see how i derived FiscalQuarterSerial. I didn't delete this. Rest of the information is removed as it is confidential.

However you can still see data model as i haven't reload that...

Thanks

Satish