Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
vitaliichupryna
Contributor II

How can I use calculated dimension in set analysis?

Hi All,

In application I need show status it's not possible to create this field in the script, so I use calculated dimension.

Status:

IF(Aggr($(eAmountPS(vPeriod,SA)), Supplier)>Aggr($(eStretch_Goal_Per_Day(vPeriod)), Supplier), 'On Track',
     IF(Aggr($(eAmountPS(vPeriod,MO))+$(eAmountPS(vPeriod,SA)), Supplier)>Aggr($(eStretch_Goal_Per_Day(vPeriod)), Supplier),'Possible w/MO',  'At Risk')) 

It works pretty good, but now I need to add KPI that should calculate another measure based on Status dimension and should show only Values with Status = 'On Track'

How can I do this?

Thanks,

Vitalii

Labels (2)
1 Solution

Accepted Solutions

Re: How can I use calculated dimension in set analysis?

May bad, why don't you just do this

Aggr(If($(eAmountPS(vPeriod,SA)) > $(eStretch_Goal_Per_Day(vPeriod)), 'On Track'), Supplier)

View solution in original post

9 Replies

Re: How can I use calculated dimension in set analysis?

How do you define your variable eAmountPS?
Highlighted
vitaliichupryna
Contributor II

Re: How can I use calculated dimension in set analysis?

eAmountPS:

Sum({<$($1),$($2)>[Extended Cost]})

Re: How can I use calculated dimension in set analysis?

May bad, why don't you just do this

Aggr(If($(eAmountPS(vPeriod,SA)) > $(eStretch_Goal_Per_Day(vPeriod)), 'On Track'), Supplier)

View solution in original post

vitaliichupryna
Contributor II

Re: How can I use calculated dimension in set analysis?

Thank you for help!

It's better way, but I still want show Value with on track status in KPI.

This solution works fine as a dimension:

Aggr(If($(eAmountPS(vPeriod,SA)) > $(eStretch_Goal_Per_Day(vPeriod)), 'On Track'), Supplier)

I tried do something like this in expression, but it doesn't show anything

Aggr(If($(eAmountPS(vPeriod,SA)) > $(eStretch_Goal_Per_Day(vPeriod)), $(eIncentiveValue(vPeriod))), Supplier)

Re: How can I use calculated dimension in set analysis?

What exactly are you looking to see? Count of Suppliers which are on track?
vitaliichupryna
Contributor II

Re: How can I use calculated dimension in set analysis?

No, I want to know Incentive value for Status On Track 

Re: How can I use calculated dimension in set analysis?

May be try this

Sum(Aggr(
If($(eAmountPS(vPeriod,SA)) > $(eStretch_Goal_Per_Day(vPeriod)), Sum([Incentive Value]))
, Supplier)
vitaliichupryna
Contributor II

Re: How can I use calculated dimension in set analysis?

It doesn't work, but in any case thank you for your help.

 

Thanks,

Vitalii

Re: How can I use calculated dimension in set analysis?

Sure, if you are able to share a sample, I am more than happy to take a look. Else, not sure what might be missing