Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
ibradly
Contributor III
Contributor III

Group by clause returning 0 for calculated fields

Hi,

Can someone please explain to me why my total impressions and impressionslostrank is giving me 0 when I do a group by clause?

Fact:
NoConcatenate
load
Date,
Device,
Engine,
Category,
Campaign,
IsBrand,
IsCoreBrand,
Program,
Geo_Modified,
Country,
Region,
Clicks,
Impressions,
Cost,
SharedDMA,
ClickToCalls,
SIS,
SISLost,
sum(Impressions)/ sum(SIS) as TotalImpressions,
(sum(Impressions)/ sum(SIS)) * sum(SISLost) as ImpressionsLostRank,
Forms, 
DNI_Calls,
resident DCM_Temp3
group By
Date,
Device,
Engine,
Category,
Campaign,
IsBrand,
IsCoreBrand,
Program,
Geo_Modified,
Country,
Region,
Clicks,
Impressions,
Cost,
SharedDMA,
ClickToCalls,
SIS,
SISLost,
Forms, 
DNI_Calls;

Sorry for the long code.

Labels (2)
10 Replies
ibradly
Contributor III
Contributor III
Author

I found the problem. I had two databases merged together and one of them did that not have device segment. That's why it was breaking.
Sorry for the back and forth. I appreciate your help.