KPI Values Not Displaying on Dashboard Cards Despite Data Exists in Source Table (AppSheet)

Dear AppSheet Community/Experts,

I am facing an issue with displaying my KPI values correctly on the dashboard view of my application. Although the data is successfully imported and the calculation logic is defined, the KPI cards on the dashboard consistently show a value of β€˜0’ or appear blank where the actual number should be.

My goal is to show the calculated value for each specific KPI (e.g., Absent Count, Absenteeism Rate, etc.) on its corresponding card.

I suspect the issue might be related to how the KPI_Value column is used across the different rows in the KPI_List table, as each row represents a different KPI.

Here are the details and attached screenshots:

  1. Image 1 (image_7080ba.png): The Source Data Table (KPI_List)

    • This image shows the data source where the column KPI_Value [Number] is currently showing β€˜0’ for most entries, even though my formulas are intended to calculate non-zero values.
  2. Image 2 (image_708137.png): The Dashboard View

    • This image shows the Dashboard where the cards are defined (e.g., β€œAbsent Count,” β€œAbsenteeism Rate (YTD)”). The value placeholder on these cards is either blank or showing β€˜0’.

My setup details:

  • Table: KPI_List

  • Column: KPI_Value [Number] (This is where the calculated value should appear).

  • Current App Formula Example (for calculating Absenteeism Rate):

    (
    COUNT(SELECT(Reporting[Code], AND([Statut] = "Absent", MONTH([Starting_Date]) = ANY(SELECT(Settings[MonthNumber], [SelectedMonth] = TRUE)), YEAR([Starting_Date]) = YEAR(TODAY()))))
    /
    COUNT(SELECT(Reporting[Code], AND(MONTH([Starting_Date]) = ANY(SELECT(Settings[MonthNumber], [SelectedMonth] = TRUE)), YEAR([Starting_Date]) = YEAR(TODAY()))))
    ) * 100
    
    
    

    (Note: I understand that this specific formula needs to be wrapped in a SWITCH() statement to apply the correct calculation based on the [KPI_Name] row, but even when applying simpler formulas, the dashboard displays β€˜0’.)

My Question is:

  • How can I ensure that the correct calculated value is dynamically fed from the KPI_List row to the specific card on my AppSheet Dashboard?

  • Should I be using a Virtual Column instead of the actual KPI_Value column to hold the SWITCH() formula?

Any guidance on the correct structure for the KPI_Value column logic in a multi-KPI data source would be highly appreciated.

Thank you for your time and help!

When an expression calculates values all based on Integers, AppSheet attempts to return an Integer. When the resulting value is less zero that Integer value will be rounded down to zero.

So, most likely happening is your division statement is resulting in zero due to rounding down and then the multiplication also returns zero.

The fix is easy, multiply each of your COUNT() functions by 1.0. This forces them to be treated as a Decimal instead of an Integer. I would also use 100.0 at the end just to be consistent. You could use the DECIMAL() function as well wrapped around the count functions.

I hope this helps!

2 Likes