cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
alopez Regular Visitor
Regular Visitor

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
Super User
Super User

Re: Help!!! Measure Dax

Hi @alopez

 

What is the code of your measure?

HotChilli New Contributor
New Contributor

Re: Help!!! Measure Dax

Show us your measure formula

alopez Regular Visitor
Regular Visitor

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!

Super User
Super User

Re: Help!!! Measure Dax

@alopez

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

alopez Regular Visitor
Regular Visitor

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]

chrispybacon Regular Visitor
Regular Visitor

Re: Help!!! Measure Dax

Maybe this helps

Measure =
(SUM(
    actualhours) * Distinctcount(Employee))
alopez Regular Visitor
Regular Visitor

Re: Help!!! Measure Dax

its [ActualWorkingHoursMonthly] * [count of EmployeeName]

alopez Regular Visitor
Regular Visitor

Re: Help!!! Measure Dax

 

 

this is the result of that formula 

 

Resource.png

 

Super User
Super User

Re: Help!!! Measure Dax

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

Measure =
SUM(actualhours) * Distinctcount(Employee)

 

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 473 members 4,702 guests
Please welcome our newest community members: