Reply
Regular Visitor
Posts: 44
Registered: ‎06-29-2016

Help!!! Measure Dax

[ Edited ]

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

AlB Member
Member
Posts: 200
Registered: ‎11-12-2018

Re: Help!!! Measure Dax

Hi @alopez

 

What is the code of your measure?

Member
Posts: 95
Registered: ‎09-10-2018

Re: Help!!! Measure Dax

Show us your measure formula

Regular Visitor
Posts: 44
Registered: ‎06-29-2016

Re: Help!!! Measure Dax

Hi @AlB,

 

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

AlB Member
Member
Posts: 200
Registered: ‎11-12-2018

Re: Help!!! Measure Dax

@alopez

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

Regular Visitor
Posts: 44
Registered: ‎06-29-2016

Re: Help!!! Measure Dax

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]

Frequent Visitor
Posts: 12
Registered: ‎11-28-2018

Re: Help!!! Measure Dax

[ Edited ]

Maybe this helps

Measure =
(SUM(
    actualhours) * Distinctcount(Employee))
Regular Visitor
Posts: 44
Registered: ‎06-29-2016

Re: Help!!! Measure Dax

its [ActualWorkingHoursMonthly] * [count of EmployeeName]

Regular Visitor
Posts: 44
Registered: ‎06-29-2016

Re: Help!!! Measure Dax

 

 

this is the result of that formula 

 

Resource.png

 

AlB Member
Member
Posts: 200
Registered: ‎11-12-2018

Re: Help!!! Measure Dax

[ Edited ]

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

Measure =
SUM(actualhours) * Distinctcount(Employee)