Forum Discussion
Anonymous
6 years agoNot applicable
Creating industry average
Hi! I would like to calculate an industry average of total visits. How do i do that? I have to tables. Table 1: Customer name Industry name Customer 1 Industry 1 Customer 2 ...
- 6 years ago
Try by creating 2 measures. Make sure that Industry and Visits table are joined properly
m_SUMVisits = SUM(Visits[Visits])m_Avg = AVERAGEX(VALUES(Industry[Customer name]),[m_SUMVisits])
FarhanAhmed
Community Champion
6 years agoTry by creating 2 measures. Make sure that Industry and Visits table are joined properly
m_SUMVisits = SUM(Visits[Visits])m_Avg = AVERAGEX(VALUES(Industry[Customer name]),[m_SUMVisits])
- Anonymous6 years agoNot applicable
Hi FarhanAhmed
THANK YOU SO MUCH! I love this community! 😄
It worked like a charm!
For anyone in the future, my final two measures was named:Total visits = SUM('Sessions (SessionStats)'[Total sessions])Visits average = AVERAGEX(VALUES(Customers[Customer name]),[Total visits]) - Anonymous6 years agoNot applicable
Hi FarhanAhmed
Do you also happen to know how i can present the industry average next to each customers value?
Like this:Customer name Total visits Industry average (m_avg) Customer 1 305 1.499 Customer 2 5.076 5.076 Customer 3 1.194 1.499 When i select the measure you helped me create "m_avg" it just shows the total visits in "Industry average"
And if you also have the time I created industry averages for other values such as "Avg. order value industry average": "Avg. order value industry average = AVERAGEX(VALUES(Customers[Customer name]),[Avg. order value])
But i would like to weigh the values by the percentage of visits that each customer have in the industry. So i get the following results below.Customer name Total visits Industry total visits % of industry total visits Avg. order value Customer 1 305 1.499 20,35 20 Customer 2 5.076 5.076 100 50 Customer 3 1.194 1.499 79,65 30 Industry Avg. order value industry (Old calculation result) Avg. order value industry (Wanted result) Industry 1 (20+30) / 2 = 25 20*20,35%+30*79,65% = 27,965 Industry 2 50 50