Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
Do you have an idea of how to achieve it?
Sum({<Year = {"$(=Max(Year))"} >} weight)
@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
@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?
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
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)
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)