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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
mariam_vd
Contributor II
Contributor II

Creating a KPI

Hello!

Could you help me to calculate the value for KPI widget:

I have 3 sections and for each, I have a total kpi in tons stored per date.

 
I want to have one KPI widget, which will show:

- the total weight

- for a selected Section

- and only for a Current year

- even if there are filters applied for a particular month/date. 

mariam_vd_0-1720712795588.png

Do you have an idea of how to achieve it?

Labels (1)
6 Replies
anat
Master
Master

Sum({<Year = {"$(=Max(Year))"} >} weight)

MatheusC
Specialist II
Specialist II

@mariam_vd 

• today() returns data from the last data load of the app, ignoring Month and Date filters.

sum({<FieldYear={"$(=Year(today()))"},month=,date=>}weight)

• max(FieldYear) returns the maximum year contained in the field of your table, ignoring Month and Date filters.

sum({<FieldYear={"$(=max(FieldYear))"},month=,date=>}weight)


- Matheus

Did you find a solution to your question? Mark the solution as accepted and if you found it useful, press the like button!
mariam_vd
Contributor II
Contributor II
Author

@MatheusC , @anat Thank you for your answers
Although, my problem is not solved in full, because, in the end I need to show only one number as a KPI, not a table. 
So I need to show either 2357.1, 235.9, or 282.0 in a KPI widget, according to the "Section" selected by a user.

How do I include the selected "Section" in the formula of the total weight?

MatheusC
Specialist II
Specialist II

A filter within each KPI of the Total_KPIW value?

If so, see it like this:
sum({<Total_KPI={‘HRC_REPAIR_TOTAL’},FieldYear={"$(=max(FieldYear))"},month=,date=>} weight)

And the same for the other filters

Did you find a solution to your question? Mark the solution as accepted and if you found it useful, press the like button!
anat
Master
Master

value1:sum({<Total_KPI={‘HRC_REPAIR_TOTAL’},FieldYear="$(=max(FieldYear))"},month=,date=>} weigt)

value2:sum({<Total_KPI={‘PICKLED_DOWNGRADE_TOTAL’},FieldYear="$(=max(FieldYear))"},month=,date=>} weigt)

value3:sum({<Total_KPI={‘HRC_DOWNGRADE_TOTAL’},FieldYear="$(=max(FieldYear))"},month=,date=>} weigt)

TauseefKhan
Creator III
Creator III

Check this :
- Value for HRC_REPAIR_TOTAL:

Sum({<Total_KPI={'HRC_REPAIR_TOTAL'}, FieldYear={"$(=Year(Today()))"}, month=, date=>} weight)

- Value for PICKLED_DOWNGRADE_TOTAL:

Sum({<Total_KPI={'PICKLED_DOWNGRADE_TOTAL'}, FieldYear={"$(=Year(Today()))"}, month=, date=>} weight)

-Value for HRC_DOWNGRADE_TOTAL:

Sum({<Total_KPI={'HRC_DOWNGRADE_TOTAL'}, FieldYear={"$(=Year(Today()))"}, month=, date=>} weight)