Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Value changes when a dimension is added

Hi

I have a graph which gives the correct value when single dimension is added , if i add a new dimension the value changes , could anybody please explain why this happens and also how i can handle this without changing the values of utilrate when operationname is added as dimension , (please look into the sample data.qvw)

Thank you

Labels (1)
17 Replies
johnw
Champion III
Champion III

1 - sum(total USED_HOURS)/sum(total AVAILABLE_HOURS)

Total isn't an aggregation function, so it wouldn't show in a list of aggregation functions. It's... I don't know, a modifier to them? It should show up in the pop up help for the sum() function, though.

Anonymous
Not applicable
Author

Thank you John ,

Now i need to display the same in the bar chart as dimension % by each operation name and idle % , i remember you have suggested me in set analysis to display something like this , and i am following the same by using the below expression , Could you please see if my expression is correct ? Please bare with me , i am writing the set analysis first time by myself.

ENGINEERING % =sum({<OPERATION_NAME*={'ENGINEERING'}>}(sum(USED_HOURS)/sum(total(AVAILABLE_HOURS))))

PRODUCTION % =sum({<OPERATION_NAME*={'PRODUCTION'}>}(sum(USED_HOURS)/sum(total(AVAILABLE_HOURS))))

MAINTENANCE % =sum({<OPERATION_NAME*={'MAINTENANCE'}>}(sum(USED_HOURS)/sum(total(AVAILABLE_HOURS))))

IDLE % = 1 - sum(total USED_HOURS)/sum(total AVAILABLE_HOURS

johnw
Champion III
Champion III

ENGINEERING %
=sum({<OPERATION_NAME*={'ENGINEERING'}>} USED_HOURS)
/sum(total AVAILABLE_HOURS)

PRODUCTION %
=sum({<OPERATION_NAME*={'PRODUCTION'}>} USED_HOURS)
/sum(total AVAILABLE_HOURS)

MAINTENANCE %
=sum({<OPERATION_NAME*={'MAINTENANCE'}>} USED_HOURS)
/sum(total AVAILABLE_HOURS)

IDLE % = 1 - sum(total USED_HOURS)/sum(total AVAILABLE_HOURS)

Anonymous
Not applicable
Author

Hi

Before using the set analysis my bar chart showed 63% stacked with Operation names , now the operation names display as separate bars, how do i make the stacked bars displaying idle 37% top of the 57 % ,5 % ,1%.. which should sum up to 100%...

basically i wanted all the operation names and idle as dimensions ...

johnw
Champion III
Champion III

Remove operation as a dimension. Make sure your bar chart is set to stacked.

Anonymous
Not applicable
Author

Hi John

This works , thank you.

I noticed a weird thing , my tables have data from past 4-5 years , and i was actually working on one week of the data , i mean was validating with one week of data if the values matches with my qlikview report , everything matched when i selected data for 1 week , week is my dimension , when i cleared the selection , that means when no week is selected all the values are showing 92% idle ,

and for the graph where i did not use set analysis , the y - axis values shows 0.02,0.04,0.06,0.08 and so on(instead of 20%,40%,60%..) ....just dont understand whats happening ...i guess its doing an average for all the weeks....or something else....

Please Help....

johnw
Champion III
Champion III

I don't know what you're saying the problem is. Guessing wildly, you may have set analysis that depends on a value being selected for week. I suspect that's a common mistake.

As for the other problem:

Properties -> Number -> checkmark "Show in Percent (%)"

Anonymous
Not applicable
Author

John ,

I guess i found where the problem is , as you said ...the available hours are specific to each week , so using total is summing up all the values and that value is used when calculating the util rate instead of available hours value for each week ,

here is the data when i selected for 2 weeks , 21504 = 10752 + 10752 , so thats why i have been getting the small values like 0.01 , 0.08 while calculating the Util rate for all the weeks , so total is not working for me here .

Can you please suggest any other option to calculate the Util rate based on each week Available Hours ?

For eg : A particular week has available hours as 10752 , and used hours is 6710 , 492,62 for the operations , Now the Util rate has to be calcuted as 6710/10752 ,492/10752 , 62/10752 so on.This gives me % for each week by its operation name.

Hope my question is clear ,

Here is what the data looks like when 2 weeks are selected,

WeekOperationSum (total(AVAILABLE_HOURS))Sum (USED_HOURS)Sum (USED_HOURS)/Sum (total(AVAILABLE_HOURS))
21504.0014040.5065%
12/5/2010ENGINEERING21504.006710.1231%
12/5/2010MAINTENANCE21504.00492.082%
12/5/2010PRODUCTION21504.0062.250%
12/5/2010-21504.000.000%
12/12/2010ENGINEERING21504.006131.5229%
12/12/2010MAINTENANCE21504.00559.273%
12/12/2010PRODUCTION21504.0085.270%
12/12/2010-21504.000.000%