Widget Impression Test = avgOver({widget_impressions}, [{metric_day},{marketplace_id},{device_type}, {placement_transformed}], PRE_AGG)
However numbers are not coming out correct.
In my screenshot Widget Impressions is what I just did
Widget Impression Test = avgOver({widget_impressions}, [{metric_day},{marketplace_id},{device_type}, {placement_transformed}], PRE_AGG)
Add that calculated field into the SUM IF ELSE, so now I can if else between impressions or widget Impressions.
Actuals is the correct number but it’s the calculated field as sum(avg({widget_impressions}, [{metric_day},{marketplace_id},{device_type},{placement_transformed}]))
which i cannot add into the SUM IF Else
widget impressions is a calculated field, impressions is just a regular field. I want to SUM if else dependent on the placement transformed chosen.
I don’t need to put a SUM, but I can’t include a calculated field of avg({widget_impressions}, [{metric_day},{marketplace_id},{device_type},{placement_transformed}]) within the SUM Ifelse because I get a “The calculation operated on Level Aware Calculation (LAC) agg expressions is not valid”
@David_Wong The issue is not with impressions because that is a separate field, so doesn’t have to match.
Total Widget Impression Test =
sum(avgOver({widget_impressions}, [{metric_day},{marketplace_id},{device_type}, {placement_transformed}], PRE_AGG))
Old Total Widget Impression Test = sum(avg({widget_impressions}, [{metric_day},{marketplace_id},{device_type},{placement_transformed}]))
Old Total Widget Impression Test gives me the correct number, but errors in the SUM IF ELSE,
Total Widget Impression Test doesn’t match Old Total Widget Impression Test; however, it fits in the SUM IF ELSE
*When do I min/max they match, but SUM they don’t …
It’s hard to troubleshoot without seeing your unaggregated data. Can you post a few rows of your unaggregated data and describe what you are trying to calculate with the widget impression field?
Now what I want to do is sum(impressions) on specific placement_transformed vice versa sum(widget impressions) on specific placement_transformed.
When I left join it’s obviously double counting the widget impressions, so that was why I had sum(avg({widget_impressions}, [{metric_day},{marketplace_id},{device_type},{placement_transformed}]))
If there’s no error but the result is wrong, it could be that the partition in the calculated field is incorrect. Can you show me 2 duplicate rows in your data so that I can see if the partition that you’re using is correct?
Can you also show a screenshot of the visual where you’re using the above calculated field? The screenshot of your table visual is cut off, so I can’t see all your dimensions.