Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am loading for am external source a table with following field (From, To information, revenue, contribution margin, YearWeek info)
Load
Geo_From_Name_AvgCalc as Geo_From_Name_Avg,
Geo_To_Name_AvgCalc as Geo_To_Name_Avg,
DB as DB_Avg,
rev_Complete as rev_Avg,
Year_Week_Avg as Year_Week_Avg
Resident facts;
There are mutiple values for each Geo From, Geo To Combination and in the Frontend I make the sum(rev_Avg) and sum(DB_Avg) to get my values.
Now I would like to use a group by, so that in the DM there should be per Geo From, To combination just ONE single line anymore.
Load
Geo_From_Name_AvgCalc as Geo_From_Name_Avg,
Geo_To_Name_AvgCalc as Geo_To_Name_Avg,
sum(rev_Complete) as rev_Avg,
sum(Year_Week_Avg) as Year_Week_Avg
// Year_Week_Avg as Year_Week_Avg
Resident facts
group by Geo_From_Name_AvgCalc ,Geo_To_Name_AvgCalc ;
The script is working unfortunately the result is just wrong.
Instead of e.g. 1468,95$ rev for East Africa to Asia the revenue is 1083,95$ - which is wrong.
How can this happen?? Any ideas are welcome.
Is there anything wrong of my understanding of group by clause???
Thank you!
Chris
Would you be able to share the raw data so that we can test it out?
Hi Sunny,
I prepared the sample file and there I found out, that the group by seems to work now. Thanks for your help
Hahahaha nice, Please close the thread in that case.
Best,
Sunny