Not providing accurate results when using COALESCE function to evaluate NULL fields as zero

Hello everyone,
I am trying to substract (Total_Egnyte_Size - Folder_2_Size) for finding Folder_6_Size where Total_Egnyte_Size and Folder_2_Size has NULL values randomly across the derived data. But it is not returning any data.

A sample query for deriving the Total_Egnyte_Size_GB:
(SELECT
COALESCE(ROUND(eg1.FolderSize / (1024 * 1024 * 1024), 3),0)
FROM
bpmsv2_dbo_tbl_egnyte_folderstat eg1
WHERE
eg1.SubFolderPath = CONCAT(‘/Shared/Projects/’, p.ServerFolder)) AS Total_Egnyte_Size_GB

and the main query is:

select distinct *, (Total_Egnyte_Size_GB - Folder_2_Size_GB) as Folder_6_Size_GB)

But when using MS-SQL to derive the same logic using isnull (), it is working fine.

Athena:

Hi @Abhisek94

welcome to QuickSight Community .

Could you please upload sample data and create the calculated fields in QuickSight Arena and share the dashboard here . This will enable us to help you better and faster .

Please check the below article to learn how to use QuickSight Arena and share the dashboard in community .

Thanks
Vinod

Thank you for letting us know. I would recommend filing a case with AWS Support where we can dive into the details so that we can help you further. Here are the steps to open a support case. If your company has someone who manages your AWS account, you might not have direct access to AWS Support and will need to raise an internal ticket to your IT team or whomever manages your AWS account. They should be able to open an AWS Support case on your behalf. Hope this helps!