Hi guys, how can I replace empty values in insight...
# gooddata-platform
l
Hi guys, how can I replace empty values in insight with 0? We need to see 0 in chart and have X-axis with all weekpoints in selected date range. I tried usinG
SELECT IFNULL(( "metric_code"),0)+0
but then I have 0 for full date dimension, from 1.1.1900 without possibility to filter it by date interval in insight or in dahsboard. (first pic with IFNULL, second without IFNULL). And second question -> how can I change weekly interval from default Sun-Sat to Mon-Sun? (3rd pic) Thanks 🙏
m
Hi Luděk, may I know what do you mean by empty values? Note that The IFNULL function will only return a “0” for any “null values”. It will not return a value when there is “no data”. Also it’s a bit hard to troubleshoot the metric without knowing how it was defined exactly. I can also suggest double checking our documentation here: Null column | The GoodData Community. Regarding your second question, at this moment we do not support the “Mon-Sun” week format in Analytical Designer. However, the only possible workaround would be to use a Custom Date Dimension: You can download CSV with calendar definition from the documentation, modify it and follow instructions how to upload the calendar definition back to platform; although this is still not ideal because the granularity will be still called Week (Sun-Sat), calendar pickers will still show Sunday as the first day of week. You can find more details on this approach, here: https://help.gooddata.com/doc/enterprise/en/dashboards-and-insights/manage-custom-date-dimensions
l
Hi Moises, the problem is that we have no data for several weeks. So the chart is missing these weekly points and in these cases the line is not continuous or the bar chart value is missing. In these cases, we need to see a zero value in the bar chart or have a line chart continuous to zero. Like the first image where the row falls to 0 when there is no data. Actually our chart looks like the 2nd picture. Is there any way in GD to solve this please? Thanks
j
For the sake of completeness - we are going to release a first class solution for "show empty values" in GoodData.CN/GoodData cloud
l
Hi Jan, thanks for info. So is there any way how to show complete date x-axis when there are no chart data in selected interval by date filter on the top of the dashboard? We dont need to see 0 values, there can be i.e. an empty space, but its really important to have complete from-to interval in x-axis in all charts. As you can see in the attachment where W2/2023 missing, its really difficult to read whole dashboard without mistake when you compare 1st and 2nd chart. I still cant find any solution. Thanks
Hi, I tried to bypass the rule and show zeros with added custom metrics
SELECT 0
. In Canvas I choose
Data Labels = hide
and
Total Labels = show
. Right, Im loosing values for each metric and have only total value, but I have zeros instead of empty values. It works, but not in all cases. Please, do you anybody knows how to solve it? There must be any solution how to show complete axis in the chart, as like as in Tableau or other simillar platforms. Thanks!
m
Hi Ludek, I’m not aware of any workaround that could bypass this, if the null values do not exist in your database, then the ifnull keyword won’t be able to make the 0's appear. You could make it work by inserting the null values in your database.