Solved

Null column

  • 14 March 2022
  • 1 reply
  • 59 views

Hello, 

Can we create a custom column with a null value? On our dashboard, customers would be extracting the report(table) and some columns should be left as null as they will be the one who will fill them with values.

icon

Best answer by Moises Morales 14 March 2022, 10:28

View original

1 reply

Userlevel 2

Hi Jeny, 

It is possible to work with Null values in GoodData, please see the following posts for a reference: 

How-To: Display Null or Missing Values

How do I create a metric with I am trying to count records that have a NULL value

 

More specifically, the IFNULL function can help you with this: IFNULL statement allows you to predefine how the GoodData platform addresses any missing values that are returned by an expression. If a metric expression that is wrapped within an IFNULL statement ever returns a null value, the replacement number specified in the second parameter of the IFNULL function is inserted in place of the null value. More details on this functionality can be found here: IFNULL

Note that The IFNULL function does not populate rows of data when the row does not exist. Rather, it forces a value to appear when the value is blank and the replacement value has to be entered via a metric like this: 

SELECT IFNULL (fact_name, replacement_value)

 Let me know if this helps.

 

-Moises

Reply