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
Anonymous
Not applicable

Calculated columns single value cannot be determined (Microsoft PowerBI tutorial)

I'm following the Microsoft tutorial for PowerBI, specifically: https://docs.microsoft.com/en-gb/learn/modules/model-data-power-bi/3-create-calculated-columns

 

Where it asks to create "the new CountryZip calculated column in the Geography table and the Sales table", using the formula: 

"CountryZip = Geography[Country] & ", " & Geography[Zip]", this works fine for the Geography table, but in the Sales table it displays the error message: 
 
"A single value for column 'Country' in table 'Geography' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result." (see screenshot below)
 
Also, if I edit the formula so that it is "CountryZip = Geography[Zip]", then therere is the same error but for column 'Zip'. 
 
Any help with this question would be greatly appreciated!
 
powerbiuser2343_0-1659610746421.png

 

 
 
1 ACCEPTED SOLUTION
johnt75
Super User
Super User

If there is a one-to-many relationship from Geography to Sales then in the Sales table you could use the RELATED function to get a value from Geography, so you could add a column to Sales like

CountryZip = RELATED(Geography[Country]) & ", " & RELATED(Geography[Zip])

View solution in original post

1 REPLY 1
johnt75
Super User
Super User

If there is a one-to-many relationship from Geography to Sales then in the Sales table you could use the RELATED function to get a value from Geography, so you could add a column to Sales like

CountryZip = RELATED(Geography[Country]) & ", " & RELATED(Geography[Zip])

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.