Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi
I require a DAX measure to work out if the number of repairs per Address line are above or below the total average for all addressess and repairs.
I have two tables
1- Address table
2- Repairs by address row by row
Example of tables
Address Table | |
Address | |
1 Nonsense Street, London | |
2 Unknown Road, London | |
3 High Road, London | |
4 Dax Lane, London | |
5 Power Road, London | |
6 Excel Street, London | |
7 Variable Lane, London | |
8 Calculate Street, London | |
Repairs Table | |
Address | Repairs |
1 Nonsense Street, London | Repair 1 |
1 Nonsense Street, London | Repair 2 |
2 Unknown Road, London | Repair 1 |
2 Unknown Road, London | Repair 2 |
2 Unknown Road, London | Repair 3 |
2 Unknown Road, London | Repair 4 |
2 Unknown Road, London | Repair 5 |
3 High Road, London | Repair 1 |
3 High Road, London | Repair 2 |
3 High Road, London | Repair 3 |
4 Dax Lane, London | Repair 1 |
5 Power Road, London | Repair 1 |
5 Power Road, London | Repair 2 |
5 Power Road, London | Repair 3 |
6 Excel Street, London | Repair 1 |
6 Excel Street, London | Repair 2 |
6 Excel Street, London | Repair 3 |
6 Excel Street, London | Repair 4 |
6 Excel Street, London | Repair 5 |
7 Variable Lane, London | Repair 1 |
8 Calculate Street, London | Repair 1 |
8 Calculate Street, London | Repair 2 |
8 Calculate Street, London | Repair 3 |
8 Calculate Street, London | Repair 4 |
8 Calculate Street, London | Repair 5 |
The visual table for the results will contain the following columns. I am using a DAX measure to count the number of repairs per address. I have another DAX measure that works out the average number of repairs for all addressess Count Repairs / Count Addressess = Average Repairs
Address | Count of Repairs |
1 Nonsense Street, London | 2 |
2 Unknown Road, London | 5 |
3 High Road, London | 3 |
4 Dax Lane, London | 1 |
5 Power Road, London | 3 |
6 Excel Street, London | 5 |
7 Variable Lane, London | 1 |
8 Calculate Street, London | 5 |
I would like to add a 3rd columns that does the following. If Count Repairs > Average Repairs then " Above Avg" If Count Repairs < Average Repairs then " Below Avg"
thank you in advance
Richard
Solved! Go to Solution.
Hi @cottrera
Here is the formula
Regards
Amine Jerbi
If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook
Thank you for your quick response. Silly question but how did you calculate the count of address shown in the 3rd column
Magae relation ship with Address column with Address and Repair table
and create new table in modeling by using summarize function
Thank you for your quick response. Silly question but how did you calculate the count of address shown in the 3rd column
Hi @cottrera
Here is the formula
Regards
Amine Jerbi
If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
95 | |
77 | |
68 | |
54 |
User | Count |
---|---|
144 | |
105 | |
102 | |
89 | |
63 |