Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
BI & Data Trends 2021. Discover the top 10 trends emerging in today. Join us on Dec. 8th REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
Contributor III

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

Highlighted
Contributor III
Contributor III

Unfortunately, it didn't worked for me

Highlighted
Creator II
Creator II

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


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

Highlighted
Contributor III
Contributor III

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

throws an error

Highlighted
Creator II
Creator II

Try

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

The autoCalendar is script generated from the data manager.

Highlighted
Contributor III
Contributor III

Yep, It worked

Thanks you so much!!

Thanks and Regards,

Drishti Goel