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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
laurentubesing
Contributor
Contributor

Dynamic KPI

Good Morning ... 

I'm working on a KPI that is dynamic to the filter for the entire sheet.  The data would be directly pulled from an excel sheet.

In my mind, I think about it like this: Sum({$<[Primary Business Segment]={'USER SELECTION'}>}[2019])

So, based upon the users' selection of the primary business segment the corresponding 2019 value would be displayed. I would like to default to be Sum({$<[Primary Business Segment]={'Grand total'}>}[2019]) and then change based upon user selection.

 

Sorry if this is a dumb ask!

 

Labels (3)
3 Replies
dplr-rn
Partner - Master III
Partner - Master III

its not clear why you need Set Analysis here?
Sum([2019]) will by default show total and if a user select a Primary Business Segment he will get only those.
please elaborate
laurentubesing
Contributor
Contributor
Author

Thanks for the reply!  I can't sum[2019] because it sums that whole column and I just need to spit out the number within the table.

See below ... I need the 2019 number to come out when the primary business segment is selected and the default for no selection would the the "grand total" number below.  If i use sum[2019] is just adds up that column and gives an inaccurate number

Primary Business Segment201720182019
Aviation Additive10.3638.9637.08
Aviation Aeroderivatives  0
Aviation AvioAero20.3719.8619.17
Aviation Avionics & Digital Systems13.0323.4222.63
Aviation Business & General Aviation & Integrated Systems6.7518.2430.76
Aviation China 00
Aviation Commercial Engines13.5828.0245.43
Aviation Communications & GE Advantage24.6922.990
Aviation Digital31.2127.3343.22
Aviation Digital League 00
Aviation Digital Technology  0
Aviation Engineering24.6331.2146.52
Aviation Finance11.0414.8818.77
Aviation Global Law & Policy  0
Aviation Headquarters7.9412.0524.84
Aviation Human Resources17.382.6274.18
Aviation Legal & Business Development76.7538.3832.89
Aviation Military Systems28.0427.4251.97
Aviation Sales & Marketing14.2926.0719.22
Aviation Services25.2331.4538.07
Aviation Supply Chain15.0516.5717.57
Aviation Transitions000
Grand total16.5120.9825.53
dplr-rn
Partner - Master III
Partner - Master III

Ok.

you can try this 

if(GetSelectedCount([Primary Business Segment])>0,Sum([2019]),Sum({$<[Primary Business Segment]={'Grand total'}>}[2019]) )