Forum Discussion

ClaireLin's avatar
ClaireLin
Frequent Visitor
6 years ago

Same column sum different value with average total

Hi,

 

I build a database in PowerBI. The structure is as below. The data of views for "day" and "insightTraficSourceType_day" are duplicate but not other data.

 

The total views of "day" should be the same as total views of "insightTraficSourceType_day". Now I use this query:

views =
CALCULATE(
SUM('youtube_insight'[field.views] ),
FILTER('Dimension', 'Dimension'[dimension] = "day" || 'Dimension'[dimension] = "insightTrafficSourceType_day"))

 

With this query, I can get all data correctly, but not total views. I hope the total views can still be 21.

Could anyone please advise how I can get each sum up correctly and also the total?

 

dimension                                     views
day                                                21

insightTrafficSourceType_day       21

-----------------------------------------------

Total                                             42