Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

expression help


Hi,

Looking for help please:

We have an app with the following script- the most important part of this is the If statement that turn a calender date in the data into Quarters. From this I want to create both a straight table and a chart that shows 'description' numbers by quarter. The chart is really easy and works; however, the straight table is just populating the same figures each quarter. I need help with what expression to put in the staright table to show figures each quarter. I can't attach application so refer to word atatchement with screen shots.

Any help would be really appreciated.


LOAD [Place Ref]

  [Tenancy Ref],
    
[Address Concat],
    
[Job No],
    
Contract,
    
[Short Description],
    
[Date Reported],
    
[Target Date],
    
[Initial Priority],
    
[Latest Priority],
    
[Date Abandoned],
    
If( Month([Date Abandoned]) >=4,  year([Date Abandoned])&'/'&  (year([Date Abandoned])+1), (year([Date Abandoned])-1)&'/'&year([Date Abandoned])) as FiscalYear,
    
If(month([Date Abandoned])<=3,'Q4', if(month([Date Abandoned])>=4 and month([Date Abandoned])<=6,'Q1', if(month([Date Abandoned])>=7 and month([Date Abandoned])<=9, 'Q2', 'Q3'))) as Quarter,
    
Description,
    
[Reported to Target days],
    
[Reported to Abandoned days],
    
[Target to Abandoned days],
    
Month,

Year

Chris

15 Replies
vijay_iitkgp
Partner - Specialist
Partner - Specialist

You Can use 'Q' &Ceil(Month([Date Abandoned)/3) AS Quarter

engishfaque
Specialist III
Specialist III

Dear Chris,

Try this,

'Q' & Ceil(Month(TO_DATE)/3) AS CalendarQuarter,

Kind regards,

Ishfaque Ahmed

ashfaq_haseeb
Champion III
Champion III

Hi,

Try below

'Q'&ceil(month([Date Abandoned])/3) AS Quarter

Regards

ASHFAQ

Not applicable
Author

Hi,

Do I put this expression in the chart properties or in script?

Not applicable
Author

Hi all,

Tried this but get the message thAt says Garbage after expression. "AS"

ashfaq_haseeb
Champion III
Champion III

Script, Make sure to comment previous expression.

Regards

ASHFAQ

ashfaq_haseeb
Champion III
Champion III

Hi,

Did you try my expression in the script?

'Q'&ceil(month([Date Abandoned])/3) AS Quarter

Make sure to comment previous expression.

Regards

ASHFAQ

Not applicable
Author

Hi,

Yes same error:

'Q'&ceil(month([Date Abandoned])/3) AS Quarter - its says garbage after expression: "AS"

Chris

ashfaq_haseeb
Champion III
Champion III

did you comment your previous quarter calculation,

Can you post your script.

may be , required

'Q'&ceil(month([Date Abandoned])/3) AS Quarter,


Regards

ASHFAQ