Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Announcing the newest addition to the Qlik Community, Qlik Gallery! Learn More
hariprasad_koya
New 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

Re: Pie chart % selection should reflect the Transactions in straight table

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.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
hariprasad_koya
New Contributor III

Re: Pie chart % selection should reflect the Transactions in straight table

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

Re: Pie chart % selection should reflect the Transactions in straight table

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

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
hariprasad_koya
New Contributor III

Re: Pie chart % selection should reflect the Transactions in straight table

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

Re: Pie chart % selection should reflect the Transactions in straight table

Expression image please and preview of that report?

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
hariprasad_koya
New Contributor III

Re: Pie chart % selection should reflect the Transactions in straight table

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

Re: Pie chart % selection should reflect the Transactions in straight table

Is that returning anything? Image please

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
hariprasad_koya
New Contributor III

Re: Pie chart % selection should reflect the Transactions in straight table

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

Re: Pie chart % selection should reflect the Transactions in straight table

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

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)