Forum Discussion
Single value error when creating a measure
Hi,
I am new to PowerBI and am creating a measure for calculating uptime %. I tried to create the measure, but got an error because one column wasn't aggregated. The error stated, "A single value for column Total Units in table Location_Table cannot be determined."
How can I calculate the uptime % for every Location? Location is the unique column in the Location_Table. Here's the tables:
| Fault_Table | |
| UnitKey | Location |
| 1001 | CA |
| 1002 | CA |
| 1003 | CA |
| 1005 | CA |
| 1007 | OK |
| 1010 | TN |
| Location_Table | |
| Location | Total Units |
| CA | 2000 |
| OK | 1000 |
| TN | 3000 |
For Faulted Units, I am counting the keys: COUNT(Fault_Table[UnitKey]).
Here's the formulas:
Working Units = Total Units – Faulted Units
Uptime % = Working Units/Total Units
Please let me know if I can provide more information.
- Anonymous8 years ago
sdavis,
Please check the dax formula in the PBIX file below.
https://1drv.ms/u/s!AhsotbnGu1NokzYo2PT_Khg-2MG0
Regards,
Lydia
3 Replies
- AnonymousNot applicable
sdavis,
Please check the dax formula in the PBIX file below.
https://1drv.ms/u/s!AhsotbnGu1NokzYo2PT_Khg-2MG0
Regards,
Lydia- sdavisFrequent Visitor
Thank you, that worked!