Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

dgoel1991
New Contributor II

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
Contributor III

Re: Bar Chart

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

dgoel1991
New Contributor II

Re: Bar Chart

Unfortunately, it didn't worked for me

skamath1_metlif
New Contributor III

Re: Bar Chart

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


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

dgoel1991
New Contributor II

Re: Bar Chart

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_metlif
New Contributor III

Re: Bar Chart

Try

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

The autoCalendar is script generated from the data manager.

dgoel1991
New Contributor II

Re: Bar Chart

Yep, It worked

Thanks you so much!!

Thanks and Regards,

Drishti Goel

Community Browser