Forum Discussion
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
2 Replies
- amitchandakSuper User
ClaireLin , not very clear to me, need some sample data
But try like
Avg Views=
avergageX(summarize('Dimension', 'Dimension'[dimension],"_1" [views]),[_1]) - AnonymousNot applicable
Hi ClaireLin,
I'd like to suggest you take look at following links about different filter levels and measure total calculations:
Clever Hierarchy Handling in DAX
Measure Totals, The Final Word
Regards,
Xiaoxin Sheng