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

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.

Reply
sdavis
Frequent Visitor

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
UnitKeyLocation
1001CA
1002CA
1003CA
1005CA
1007OK
1010TN

 

      Location_Table
LocationTotal Units
CA2000
OK1000
TN3000

 

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. 

1 ACCEPTED SOLUTION
v-yuezhe-msft
Employee
Employee

@sdavis,

Please check the dax formula in the PBIX file below.

https://1drv.ms/u/s!AhsotbnGu1NokzYo2PT_Khg-2MG0

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
danextian
Super User
Super User

Hi @sdavis,

 

Measures need to be aggregated.  It should be something like this:

 

MEASURE =
DIVIDE ( SUM ( 'Table'[Column1] ), SUM ( 'Table'[Column2] ) )

 










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
v-yuezhe-msft
Employee
Employee

@sdavis,

Please check the dax formula in the PBIX file below.

https://1drv.ms/u/s!AhsotbnGu1NokzYo2PT_Khg-2MG0

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you, that worked!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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