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

Help!!! Measure Dax

Hi Guys,

 

please help. I would like to create a measure wherein I will calculate the [# of hours] * [# of Employees] but I got this problem 

 

"Got an error: The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value?"

 

Data_Sample.png

13 REPLIES 13
chrispybacon
Helper I
Helper I

Maybe this helps

Measure =
(SUM(
    actualhours) * Distinctcount(Employee))
Anonymous
Not applicable

 

 

this is the result of that formula 

 

Resource.png

 

the SUM on @chrispybacon's code is only for the first column.

Measure =
SUM(actualhours) * Distinctcount(Employee)

 

Anonymous
Not applicable

Hi @AlB,

 

Still its not working. 😞 but thanks for trying to help me

Hi @Anonymous

 

You may try below measure. If it is not your case, could you explain more about your expected output with below sample data?

Measure = SUMX(BillableNonResource,BillableNonResource[ActualWorkingHoursMonthly]*DISTINCTCOUNT(BillableNonResource[EmployeeName]))

1.png

 

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi @v-cherch-msft thank you for helping me but the results are not correct.

 

See screenshot below. Thank you!

 

 TEST.png

Hi @Anonymous

 

Not sure about your expected output. But you may try below measure.

test =
SUM ( BillableNonResource[ActualDays] )
    * COUNTROWS (
        SUMMARIZE (
            BillableNonResource,
            BillableNonResource[Employee],
            BillableNonResource[Month]
        )
    )

Regards,

Cherie

 

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
HotChilli
Super User
Super User

Show us your measure formula

Anonymous
Not applicable

Hi @HotChilli,

 

Actually I'm not sure what formula or code I will use.

 

I want to get the value of [# of ActualWorkigHoursMonthly] * [Total # of Employees]

AlB
Super User
Super User

Hi @Anonymous

 

What is the code of your measure?

Anonymous
Not applicable

Hi @AlB,

 

Actually, I don't know what is the correct code for this 😞 I'm a newbie. Thanks for the reply!

@Anonymous

What is the operation exactly, with the names of the columns in your data?

Anonymous
Not applicable

its [ActualWorkingHoursMonthly] * [count of EmployeeName]

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.