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

RE:Negative quarters

Hi all,

I have issue on Quarters

'

As i am getting negative Quarters in my  Dashboard.

in listbox

i have yearquarter field.

in that it is displaying

-Q1 

-Q2

2014 -Q1

2014-Q2

lik dat it is showing?

what is the reason?  and i dont want that Quarterfields which is in negative..  i just want  yearquarter  only.

Thanks in Advance

1 Solution

Accepted Solutions
sunny_talwar

I guess you can do this:

If(Len(Trim(WHEAT_REJ_YEAR)) > 0, WHEAT_REJ_YEAR &'-'& WHEAT_REJ_QUATER) as WHEAT_REJ_QUATERYEAR,

This will only create this new WHEAT_REJ_QUATERYEAR field when WHEAT_REJ_YEAR will have a value

View solution in original post

6 Replies
Kushal_Chawda

How you are creating quarter?

Chanty4u
MVP
MVP
Author

kush,

Rejection:

LOAD

 

     WHEAT_REJ_YEAR &'-'& WHEAT_REJ_QUATER As WHEAT_REJ_QUATERYEAR,

    

From $(vQVDTargetDir)ZREJ_TRACWHEAT.qvd(qvd)  where WHEAT_REJ_DATE<='30/12/2016' and WHEAT_REJ_DATE<=Date('31/08/2015') ;

Note: Wheat_RejectQuarteryear  filed value showng negative in listbox.

Kushal_Chawda

I think there are some blank values in your WHEAT_REJ_YEAR field that is why some values are -Q1.. it's not actually minus but '-' hyphen. also try to change your where like below

WHEAT_REJ_DATE <=date#('30/12/2016','DD/MM/YYYY') and WHEAT_REJ_DATE >=Date#('31/08/2015','DD/MM/YYYY') ;

HirisH_V7
Master
Master

Hi,

What are fields of ,

WHEAT_REJ_YEAR

&

WHEAT_REJ_QUATER

&

WHEAT_REJ_DATE

Look like?


-Hirish



HirisH
“Aspire to Inspire before we Expire!”
sunny_talwar

I guess you can do this:

If(Len(Trim(WHEAT_REJ_YEAR)) > 0, WHEAT_REJ_YEAR &'-'& WHEAT_REJ_QUATER) as WHEAT_REJ_QUATERYEAR,

This will only create this new WHEAT_REJ_QUATERYEAR field when WHEAT_REJ_YEAR will have a value

Chanty4u
MVP
MVP
Author

rej_year

2014

2015

2016

rej_date

31-08-2014

01-09-2014  lik so on