Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Anonymous
Not applicable

Maybe this helps

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

 

 

this is the result of that formula 

 

Resource.png

 

AlB
Community Champion
Community Champion

the SUM on @Anonymous'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
Community Champion
Community Champion

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
Community Champion
Community Champion

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!

AlB
Community Champion
Community Champion

@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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.