Forum Discussion

Jack_Machesky's avatar
Jack_Machesky
Cloud Apps
03-08-2024

Displaying data for null values

I have multiple widgets on my dashboard that I would like to show values of "0" for if they are null values. What is the best way to achieve this?

6 Replies

  • GSSC's avatar
    GSSC
    Cloud Apps

    Assuming you are using the formula SUM([Revenue]) you could try:

    CASE WHEN ISNULL(SUM([Revenue])) THEN 0 ELSE SUM([Revenue]) END
    • Jack_Machesky's avatar
      Jack_Machesky
      Cloud Apps

      When using this approach, I am met with "

      Error querying your data model An unknown error has occurred."
       
      • Jack_Machesky's avatar
        Jack_Machesky
        Cloud Apps

        It looks like this approach is working for a formula that only contains a SUM function, but when I try and use it for a formula using a PASTYEAR(SUM()) formula, it is not working. I will paste my formula it is not working for below: Pastyear(sum([Total Sales]))

  • bamo's avatar
    bamo
    Cloud Apps

    hii...You can achieve this by setting up conditional formatting or logic in your dashboard software to replace null values with "0" before displaying them.

    • Jack_Machesky's avatar
      Jack_Machesky
      Cloud Apps

      Hello David,

       

      In my case, this does not solve the issue I am facing. I am looking at blox widgets that are pointed at a salesforce database, and was wondering if I could return values of 0 for all null values.

      Thanks,

      Jack