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
emilypoon
Advocate I
Advocate I

DAX GROUP BY error - Couldn't load the data for this visual

Hi,

 

I want to put a DAX measure into Power BI desktop but I got an error message as follow:error.PNG

 

My DAX expression as follow:

 

test_teu = GROUPBY(OrderedItemSummaryBI,OrderedItemSummaryBI[ShipmentContainerNumber],"test_teu",AVERAGEX(CURRENTGROUP(),OrderedItemSummaryBI[ContainerTEU]))

 

 

The idea of the formula is to calculate the average ContainerTEU for each ShipmentContainerNumber.

So, I tried to used GROUPBY to aggregate the ShipmentContainerNumber and calculate the average ContainerTEU for each of the ShipmentContainerNumber.

 

The final product I want to have is to sum up the total of the "Average ContainerTEU" for all the ShipmentContainerNumbers.

 

Is there anything wrong with the formula or if anything was missing?

Thank you!

 

 

Best regards,

Emily

 

2 REPLIES 2
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @emilypoon ,

 

Have you solved your problem?

 

If you have solved, could you please share the solution or accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

 

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @emilypoon,

 

Based on this document, it says that Group by returns a table, not a scalar value. 

 

"Return Value:  A table with the selected columns for the groupBy_columnName arguments and the grouped by columns designated by the name arguments."

 

This is exactly what this error message is saying.

 

Best  Regards,

Cherry

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

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.