Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression not recognising dimension despite P()

can you please look at the 2nd expression. I expect it to respect the dimension in iteration in terms of the P() function. But it doesn't. Can someone help?

Thanks,

Ram

11 Replies
danieloberbilli
Specialist II
Specialist II

the dimension is from tablea

the first expression sums the values from tablea > everything fine

but the second expression sums the values from tableb...so no matter what you write in set analysis, if your dimension is from the (unlinked) tablea there wont be any differences per dimension (of tablea).

one possible solution for expression 2 would be:

sum(if(segment_code=t_segment_code, t_actual_amt))

danieloberbilli
Specialist II
Specialist II

the problem is that the p() function does not tell qlik how to allocate the sum(value) across the unlinked dimension

Not applicable
Author

Thanks Daniel for your prompt response.

the sum(if should work. Put in the expression and the dashboard hangs for 30 mins and didn't come back. I think if is very slow performing compared to set analysis in this case. I agree with you on what you say about P() in terms of unlinked dimension. Can there be any other workaround in the context of set analysis?

danieloberbilli
Specialist II
Specialist II

what about if both tables share segment as a common dimension? Scripting the segment in a separate dimension table and let both tables be linked to that dimension. This would also enable your set analysis expression you had before.

Not applicable
Author

I tried, doesn't work. The data model is too complicated and this chart is just one of the 100s of charts and all other work fine because i don't have to show the data from both these tables in the same chart. this is the only chart where i have the requirement. Can't afford to touch the data model just for this one chart and introduce a lot of regression.

danieloberbilli
Specialist II
Specialist II

Maybe try this in your dimension (instead of the grouped dimension)

=aggr(only(segment_code),t_segment_code)

danieloberbilli
Specialist II
Specialist II

one more idea: try to force the user to limit/reduce the data before showing/calculating the table if this is possible...e.g. let the user set a certain start/end date or selection on certain segments/categories whatever works out 

Not applicable
Author

Hi Daniel, Gives me a NULL in the dimension.

Not applicable
Author

actually i made a very simple chart with sum(if expression in my data model. simply hangs..... but as the test harness suggests it works but just the sheer volume i believe brings it down.