Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
ClaireLin
Frequent Visitor

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 2
Anonymous
Not 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

amitchandak
Super User
Super User

@ClaireLin , not very clear to me, need some sample data

But try like

Avg Views=
avergageX(summarize('Dimension', 'Dimension'[dimension],"_1" [views]),[_1])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors