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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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