Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
edgar_extr
Contributor II
Contributor II

Create data in pie chart possible?

Hi,

is it possible to create a pie chart where total value (or 100%) consists of a value not defined in the load script?
If possible I would like to define total value when creating the pie chart.

Dimension: Type
Measure: sum(Duration)
Total value of pie chart should be a full day (24 hours), therefore size of Production = 14/24, etc...and finally  2/24 for other activities for which there is no actual data available.

Or is it a must that this has to be done in the load script (sum and group by Date & Machine and create new row 24 minus grouped value)?

Load * inline
[
Date, Machine, Type, Duration
01.03.2019, A, Production, 14:00:00
01.03.2019, A, Stoppage, 06:00:00
01.03.2019, A, Maintenance, 02:00:00
];

Thank you for your help.

have a nice weekend 🙂
edgar

1 Solution

Accepted Solutions
edgar_extr
Contributor II
Contributor II
Author

Hi Channa,

I will mark my question as solved and will create the neccessary data in load editor.
Therefore my question is obsolete.
Thank you for your help.

regards
edgar

View solution in original post

4 Replies
Channa
Specialist III
Specialist III

=time(Duration,'hh')/24

 

it will show value

but pie chart shows area % as well..

Channa
edgar_extr
Contributor II
Contributor II
Author

Hi Channa,

thank you for your reply.
I was looking for a way to calculate and also show what I defined as Duration_Delta in the code snippet below.
sum of all actual postings is 22, therefore Type 'Delta's value is 2 hours.

If I do not want this calculation to be done in the load editor - is there a way to create a pie chart where the Delta of 2 hours is calculated within the pie chart? Or is the only possible way to do this via load editor?

Unbenannt.PNG

 

A:
Load * inline
[
Date, Machine, Type, Duration
01.03.2019, A, Production, 14:00:00
01.03.2019, A, Stoppage, 06:00:00
01.03.2019, A, Maintenance, 02:00:00
];

Load
Date,
Machine,
'Delta' as Type,
Time(Duration_Delta, 'hh:mm:ss') as Duration;

B:
Load
if(sum(Duration) < 1, (1-sum(Duration)), 0) as Duration_Delta,
Date,
Machine
Resident A
group by Date, Machine;

regards
edgar

Channa
Specialist III
Specialist III

you trying to make 2/22..6/22?? or 2/24,6/24

 

initial post you are asking how we can make pie chart shows % not on area 

 

Channa
edgar_extr
Contributor II
Contributor II
Author

Hi Channa,

I will mark my question as solved and will create the neccessary data in load editor.
Therefore my question is obsolete.
Thank you for your help.

regards
edgar