Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
cbaqir
Specialist II
Specialist II

Pivot Table Expression Cascades when grouped

I am trying to figure out what is wrong with my syntax that causes the Variance and Forecast Accuracy to cascade to all rows when grouped by Program/Portfolio but if a single Project is selected, it looks correct.

12-9-2015 8-26-05 AM.jpg

Single and Correct:

12-9-2015 8-27-42 AM.jpg

Dimensions:

PROG_PORT

REQUEST_ID

Variables and Their Expressions:

vNewForecastAccuracy  =IF(($(vForecastRound)=0 and $(vActualRound)=0),IsNull(Null()),IF(FABS($(vNewVariance))>1,0,1-FABS(($(vNewVariance)))))

vNewVariance  =IF($(vVariance)=0,0,IF($(vForecastRound)=0,IF($(vVariance)<0,-1,1), ($(vVariance)/ ($(vForecastRound)))))

Thanks,

Cassandra

12 Replies
Not applicable

hi,

you must remove the sign = in your variables

Variables and Their Expressions:


vNewForecastAccuracy 

IF(($(vForecastRound)=0 and$(vActualRound)=0),IsNull(Null()),IF(FABS($(vNewVariance))>1,0,1-FABS(($(vNewVariance)))))

vNewVariance 

IF($(vVariance)=0,0,IF($(vForecastRound)=0,IF($(vVariance)<0,-1,1), ($(vVariance)/ ($(vForecastRound)))))

m_woolf
Master II
Master II

Here's a guess:

Your variables contain calculations. Those calculations are not done in the chart and therefore are not aggregated by the chart dimensions.

cbaqir
Specialist II
Specialist II
Author

Why aren't the calculations done in the chart? It works fine when I select one project.

m_woolf
Master II
Master II

I presume that you have calculations in your variables. Those calculations are not limited by the chart dimensions.

When you select a project, you are limiting the calculation in your variables.

cbaqir
Specialist II
Specialist II
Author

So is the answer to not use a variable with calculations in a chart or to add the chart dimensions into the statement? If the latter, how would I do that?

cbaqir
Specialist II
Specialist II
Author

Why would that make a difference?

cbaqir
Specialist II
Specialist II
Author

It seemed to fix vNewVariance  but not vNewForecastAccuracy.

Not applicable

Can you show me the result for vNewForecastAccuracy

cbaqir
Specialist II
Specialist II
Author

12-10-2015 9-13-32 AM.jpg