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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
daniel_t_93_
Frequent Visitor

Calculating averages on row level in table visualisation

Hi,

 

I'm a bit stuck with getting correct averages in a table visual. 

 

My data source (simplified) looks a bit like this:

 

DateChannelPlatformCostTransactionsCost per Transaction
1Paid SearchGoogle10001566.67
1Paid SearchBing500683.33
1Paid SocialMeta7005140.00
1Paid SocialPinterest2500 
1Paid SocialSnapchat1000 
1DirectDirect 20 
1OrganicOrganic 17 
2Paid SearchGoogle12001485.71
2Paid SearchBing600875.00
2Paid SocialMeta7506125.00
2Paid SocialPinterest2001200.00
2Paid SocialSnapchat75175.00
2DirectDirect 18 
2OrganicOrganic 14 

 

Cost per Transaction is calculated as DIVIDE(SUM(Cost)/SUM(Transactions)). This works perfectly fine on row level. 

 

However, when creating a table visual (using average as aggregation), I get this:

ChannelPlatformCostTransactionsCost per Transaction (what I have now)Cost per Transaction (wanted solution)
Paid SearchGoogle22002975.8675.86
Paid SearchBing11001478.5778.57
Paid SocialMeta145011131.82131.82
Paid SocialPinterest4501200.00450.00
Paid SocialSnapchat175175.00175.00
DirectDirect038  
OrganicOrganic031  

 

The first cost per transaction column is what I have now, but that one is incorrect since it doesn't take into account rows where there were cost, but no transactions. What I need is a calculation like the one in the most right column of this example, which calculates the average on row level in the table visualisation. Anyone who can help me out?

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

lbendlin_0-1719854841787.png

Still works on all levels, but needs to be a measure.

View solution in original post

1 REPLY 1
lbendlin
Super User
Super User

lbendlin_0-1719854841787.png

Still works on all levels, but needs to be a measure.

Helpful resources

Announcements
Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

Find out what's new and trending in the Fabric community.

Top Kudoed Authors