Forum Discussion
Calculate Average based on Multiple Columns
Hi
I have the following dataset in PBI but struggling to find a way to calculate the average across multiple columns.
For example, the below average is 15.96 based on the distinct count of fields across Company, UMR and ImportFileName:
I think I need to do a AVERAGE with a GROUP BY based on Company, UMR and ImportFileName but unsure how to achieve this
Any help would be appreciated
Thanks
Brian
brian0782 , Assume you have a measure [distinctCOUNT of field]
Try a measure like
AverageX(summarize(Table, [Company], [UMR] , [ImportFileName], "_1", [distinctCOUNT of field]),[_1])
4 Replies
- amitchandakSuper User
brian0782 , Assume you have a measure [distinctCOUNT of field]
Try a measure like
AverageX(summarize(Table, [Company], [UMR] , [ImportFileName], "_1", [distinctCOUNT of field]),[_1])
- brian0782Helper II
This worked fantastically - thank you! Can I ask the what the syntax "_1" does?
- amitchandakSuper User
brian0782 , In summarize we need to give column names for summarized columns or measure. I usually give _1, _2 kind of name to these columns, so they do mix with main name I have
refer if needed
Summarize - https://www.youtube.com/watch?v=qE5KBp4uP0g
- harsha449Frequent Visitor
I tried to use the meaure suggested above but it did not work. Any guidance on this.
I'm trying to calculate Average based on multiple colums. data in available in the link below.
Need help with measure to calculate Average_Engagement score based on two columns (company and campaign)
Company Campaign Average_Engagement score J Sun 25% J Mon 30% J Tue 40% J Wed 60% J Thu 70% Any guidance will be greatly appreciated.