Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
hariprasad_koya
Contributor III
Contributor III

Pie chart % selection should reflect the Transactions in straight table

Hi friends,

Can anyone suggest any idea on this...I tried a lot of ways but not able to work it out.The below query should be done at UI level itself.

I just have one query. Though it is loking very simple but iam not able to achieve it. so require help.

I have the salesorder date and sales data sample sheet. only below 2 points to be shown in qlikview

1. Pie chart showing % of Sales <30 days,31-60,61-90,>90 days wrto total sales.(it was created in the QVW)

2.Upon the selection of pie chart slices respective data should be shown in the straight table(Salesorderdate and Sales)

Eg : if i select <30 days slice in pie chart it should show straight table for <30 days transactions.

Please help me out regarding this.Please find the  attachments.

Regards,

Hari

21 Replies
Anil_Babu_Samineni

Create this in script?

Load [Sales Date], Sales,

If(Day([Sales Date]) <30, '<30 days'),

If(Day([Sales Date]) >30 and Day([Sales Date]) <= 60, '31-60',

If(Day([Sales Date]) >60 and Day([Sales Date]) <= 90, '61-90', '>90 days'))) as Days_Bucket

From Table;


Then, Create chart And use Sum(Sales) is the measure then Take filter as Days_Bucket then see while filter.

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
hariprasad_koya
Contributor III
Contributor III
Author

Hi Anil,

Thanks for your response.

I dont want to change anything in script,but i want to do this only at the presentation layer.

Can you pls suggest.

Thanks

Hari

Anil_Babu_Samineni

Try to reply over conversation only.

Even, With Presentation Layer you could do using.

List box expression looks like below and then start filter it will effect to entire Dashboard.

If(Day([Sales Date]) <30, Dual('<30 days',1),

If(Day([Sales Date]) >30 and Day([Sales Date]) <= 60, Dual('31-60',2),

If(Day([Sales Date]) >60 and Day([Sales Date]) <= 90, Dual('61-90',3), Dual('>90 days',4))))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
hariprasad_koya
Contributor III
Contributor III
Author

Hi Anil,

At the UI level it is not working...

I have created using valuelist and it is coming correctly but iam not able to select the slices in the pie chart.

Can you pls suggest anyother way at the UI level.

Regards,

Hari

Anil_Babu_Samineni

Expression image please and preview of that report?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
hariprasad_koya
Contributor III
Contributor III
Author

Hi Anil,


Dimension :

=If(Day([Sales Date]) <30, Dual('<30 days',1),


If((Day([Sales Date]) >30 and Day([Sales Date]) <= 60), Dual('31-60',2),


If((Day([Sales Date]) >60 and Day([Sales Date]) <= 90), Dual('61-90',3),

Dual('>90 days',4))))


Expression :

sum(Sales)


Please suggest on how to arrive at the pie chart and upon the selection of slices in pie chart it should give the transaction to that particular table in straight table.


Thanks,

Hari

Anil_Babu_Samineni

Is that returning anything? Image please

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
hariprasad_koya
Contributor III
Contributor III
Author

Piechart.PNG

Here 61 to 90 days is missing and i need a straight table below which changes as per the selection in pie chart.

Thanks,

!Hari

Anil_Babu_Samineni

Some what better now. Try this?

If(Day([Sales Date]) <=30, Dual('<=30 days',1),

If(Day([Sales Date]) >30 and Day([Sales Date]) <= 60, Dual('31-60',2),

If(Day([Sales Date]) >60 and Day([Sales Date]) <= 90, Dual('61-90',3), Dual('>90 days',4))))

Note - The reason only thing i can think, There might be no data for that period. Can you do Day([Sales Date]) in list box and check the dates where there is data b/w 61 and 90?

POS - And make sense, Dates won't return always 61 and 90 in Date field because each month we have 31 only

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful