Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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?"
Maybe this helps
Measure =
(SUM(
actualhours) * Distinctcount(Employee))
this is the result of that formula
the SUM on @Anonymous's code is only for the first column.
Measure = SUM(actualhours) * Distinctcount(Employee)
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]))
Regards,
Cherie
Hi @v-cherch-msft thank you for helping me but the results are not correct.
See screenshot below. Thank you!
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
Show us your measure formula
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]
Hi @Anonymous
What is the code of your measure?
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?
its [ActualWorkingHoursMonthly] * [count of EmployeeName]
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 35 | |
| 34 | |
| 31 | |
| 27 |
| User | Count |
|---|---|
| 135 | |
| 102 | |
| 67 | |
| 65 | |
| 56 |