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

Announcements
Posting on Qlik Community is temporarily paused. Thank you for patience and we'll update you soon!
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

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

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
MVP
MVP

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
MVP
MVP

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
sunny_talwar
MVP
MVP

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