Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
deepikavijayan
Partner - Contributor
Partner - Contributor

Multiple selection in Bar chart is failing

Hi All,

I have sum of of the outstanding amount displayed month on month. If I am selecting a single month then i is showing me proper data. But when I am selecting more than one month, then the previous months are dropping to zero. Please refer to the screen shot attached.I have attached the app also.

Please let me know if the qvd is required. Will attach the same.

Thanks,

Deepika

8 Replies
undergrinder
Specialist II
Specialist II

Hi Deepika,

can you share us the qvf or the expression you used in charts?

G.

deepikavijayan
Partner - Contributor
Partner - Contributor
Author

Dimension is Date whose expression is

IF(DATE(DateBrn)>=$(vDate), DMMonthName)

DMMonthName is the name of the months from and DateBrn are the dates of the trenasactions

Measure is Outstanding amount. Expression-

(IF((ISNULL(GetFieldSelections(DateBrn))),

sum(IF(DateBrn=ApplicationDate,AmtOSTodayLcy,AmtOSMonthendLcy))

,sum ({<AmtOSTodayLcy={">0"}, DateBrn = {'$(=Max(DateBrn))'} >} AmtOSTodayLcy )))

undergrinder
Specialist II
Specialist II

Hi Deepika,

thank you for sharing.

the dimension part should be ok, because you wouldn't see the bars, if not.

I think the problem is at the bold part:

(IF((ISNULL(GetFieldSelections(DateBrn))),

sum(IF(DateBrn=ApplicationDate,AmtOSTodayLcy,AmtOSMonthendLcy))

,sum ({<AmtOSTodayLcy={">0"}, DateBrn = {'$(=Max(DateBrn))'} >} AmtOSTodayLcy )))

So the second bar is not null because the Max(DateBrn) condition is fulfilled, but the first bar isn't.

G.



deepikavijayan
Partner - Contributor
Partner - Contributor
Author

Thank you Gabor for the analysis.

Can you please advice me what condition shall i add or remove for the same.

Thanks,

Deepika

undergrinder
Specialist II
Specialist II

So you need the AmtOSTodayLcy for the max date, group by Month.

I don't know if it is possible with set analysis, but you can create a flag for it in load script - the maximum date per month, and in the expression you can use , Date_flg={1}

Maybe...

G.

deepikavijayan
Partner - Contributor
Partner - Contributor
Author

Thanks Gabor.

I tried with the below expression replacing DateBrn as DMMonth

(IF((ISNULL(GetFieldSelections(DMMonth))),

sum(IF(DateBrn=ApplicationDate,AmtOSTodayLcy,AmtOSMonthendLcy))

,sum ({<AmtOSTodayLcy={">0"}, DateBrn = {'$(=Max(date(DMMonth)))'} >} AmtOSTodayLcy )))

Now the multiple selection for months is working but there is another problem now.

There is another chart which shows date wise representation of the same.in a bar chart. There if I select multiple dates, the monthwise value becomes zero after i made the above changes.

For datewise representation below are the expression

for Date dimension

(IF((ISNULL(GetFieldSelections(DMMonth))),

sum(IF(DateBrn=ApplicationDate,AmtOSTodayLcy,AmtOSMonthendLcy))

,sum ({<AmtOSTodayLcy={">0"}, DateBrn = {'$(=Max(date(DMMonth)))'} >} AmtOSTodayLcy )))

for measure Outstanding Amount

SUM(AmtOSTodayLcy)

Please advice

undergrinder
Specialist II
Specialist II

I'm gettting lost, can you share a qvf with us, without confidental information of course?

deepikavijayan
Partner - Contributor
Partner - Contributor
Author

Hi Gabor,

Attaching the qvf. Please have a look.

Thanks