Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Bar Chart

Hi All,

So, I have a new requirement where I have draw a bar chart and plot the columns (Book Date and SWB SAD) as dimensions and measure as Ext Resale. The tricky part is if there is no date under SWB SAD column(Y) then it should pick the date from Request date (X).

Attach is the excel sheet.

Thanks in advance!!

Regards,

Drishti Goel

6 Replies
CarlosAMonroy
Creator III
Creator III

Hi Drishti,

Well, I guess you can do that condition in the script right. If the date1 is null so pick date2 as date3.

And then just plot the bar chart using date 3 dimension.

TableName:

Load

Field1,

Field2,

Date1,

Date2,

if( isnull(Date1), Date2,Date1) as Date3

From

Table;

Hope that helps,

Carlos

Anonymous
Not applicable
Author

Unfortunately, it didn't worked for me

skamath1
Creator III
Creator III

Change if( isnull(Date1), Date2,Date1) as Date3


to if(Len(Trim(Date1)) =0,Date2,Date1) as Date3

Anonymous
Not applicable
Author

if(Len(Trim([SWB SAD.autoCalendar.Date]))=0,([Request Date.autoCalendar.Date]),([SWB SAD.autoCalendar.Date])) as ([SWB SAD.autoCalendar.Date]))

throws an error

skamath1
Creator III
Creator III

Try

if(Len(Trim([SWB SAD]))=0,[Request Date],[SWB SAD]) as [SWB SAD]

The autoCalendar is script generated from the data manager.

Anonymous
Not applicable
Author

Yep, It worked

Thanks you so much!!

Thanks and Regards,

Drishti Goel