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
jip31
Regular Visitor

Help on my first measure

Hello

 

I just begin with Power BI

I try to use the measure below but i have the message "L'expression fait référence à plusieurs colonnes. Plusieurs colonnes ne peuvent pas être converties en une valeur scalaire."

What i have to do please?

 

 

 

Student Summary Average Height =
UNION(
    ROW("Gender", "F", "Student Average Height", [Average Height F]),
    ROW("Gender", "M", "Student Average Height", [Average Height M])
    )

 

 

 

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Hi @jip31,

 

Seems like you created a measure.
Click on Modeling->New table->enter your formula here.

 

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

Regards,

Husna

View solution in original post

Anonymous
Not applicable

@jip31 By creating a measure it will return scalar value -->like ex:total sum=1234
UNION functions returns table because of which it is throwing error.

You may refer the below link for more details
https://dax.guide/union/ 

Regards,

Husna 

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @jip31,

 

Seems like you created a measure.
Click on Modeling->New table->enter your formula here.

 

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

Regards,

Husna

Hi

Yes you are right

It works Modeling->New table

But I dont understand why I need to create a new table instead displaying the result in my actual table with a new mesure?

Pearhaps because I use the UNION function?

Anonymous
Not applicable

@jip31 By creating a measure it will return scalar value -->like ex:total sum=1234
UNION functions returns table because of which it is throwing error.

You may refer the below link for more details
https://dax.guide/union/ 

Regards,

Husna 

 A measure must return a single value in any given context. Your formula defines a table so it cannot work as a measure. You can use a measure within a table (e.g. in defining a calculated column) but you cannot create a table with a measure.

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.