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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Count of average

Hello!

 

I'm trying to make a visualization that shows the count of average of a driver's driving index.

 

Here are my group conditions, so if the driver's  average driving index is 83 it should count it to the "80-85" category.

 

Group Values DrivingIndex =
SWITCH (
TRUE();
CombinedTable[drivingindex] >= 0
&& CombinedTable[drivingindex] < 80; "<80";
CombinedTable[drivingindex] >= 80
&& CombinedTable[drivingindex] <= 85; "80-85";
CombinedTable[drivingindex] >= 86
&& CombinedTable[drivingindex] <=90; "85-90";
CombinedTable[drivingindex] >= 91
&& CombinedTable[drivingindex] <=95; "90-95";
CombinedTable[drivingindex] >= 96
&& CombinedTable[drivingindex] <=100; "95-100";
"Other"
)

I tried calculating the count of average with this syntax but it is not working and i'm not sure if it's even the right way to go about it.

Average total = IF(HASONEFILTER(CombinedTable[driver_id]);
[Driving index average];
COUNTX(ALL(CombinedTable[drivingindex]); [Driving index average]))
 
 
Here is my usual average calculation:
Driving index average = AVERAGE(CombinedTable[drivingindex])
 
Example of what I'm trying to achieve. So count of the averages in each group.Example of what I'm trying to achieve. So count of the averages in each group.
1 REPLY 1
lbendlin
Super User
Super User

That has nothing to do with averages. You may call it a 'distribution"  but you should not really use a line chart - there is no correlation between your buckets.  Column charts are much more appropriate.

 

By the way your grouping can be simplified

Group Values DrivingIndex = SWITCH (TRUE();
CombinedTable[drivingindex] < 0; "Other";
CombinedTable[drivingindex] < 80; "<80";
CombinedTable[drivingindex] <= 85; "80-85";
CombinedTable[drivingindex] <=90; "85-90";
CombinedTable[drivingindex] <=95; "90-95";
CombinedTable[drivingindex] <=100; "95-100";
"Other")

 

 

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors