Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Good day,
First I use live data set and it is not allowed to add columns or modify any tables. When I try to use MID, RIGHT, LEFT gives me the error "The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value". Colum that I want to extract values is measure formatted as a number.
Suggestions?
Thanks
HI @Samarth_18
I tried usning SUMX same error, here is excel example where Value is number and when used MID(A2,4,2)&"/"&RIGHT(A2,2)&"/"&MID(A2,2,2) New Vlaue will become a date.
Value | New Value |
1220511 | 05/11/22 |
1220519 | 05/19/22 |
Hope will help
@NDDD , Please try this.
Measure =
var _year = MID(MAX('Table'[Value]),2,2)
var _day = right(MAX('Table'[Value]),2)
var _month = MID(MAX('Table'[Value]),4,2)
return _month&"/"&_day&"/"&_year
Output:-
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
HI @Samarth_18
Same error "The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value". Don't know if helps at the original BI file I have more columns.
Thank you
@Samarth_18 Belive the issue is that in my example "Value" is a measure, not a column, as MAX function will only accept column reference as an argument.
"Value" measure is created to convert string text to number
Here is the measure as you suggested:
New Value as Date ND = var _year = MID(MAX('Item Change Activity'[New Value as number ND]),2,2) var _day= RIGHT(max('Item Change Activity'[New Value as number ND]),2) var _month = mid(max('Item Change Activity'[New Value as number ND]),4,2) return _month&"/"&_day&"/"&_year
@NDDD , I am not sure if I am getting it correctly but If you wanted to convert string to number then you can try int(value).
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
@Samarth_18 I used measure above to convert string to number as int will consider only measure not column. I use a live connection and there are restrictions :(.
Your measure with MAX will work when there is column. In my case, there is measure that is used to convert string to a number.
Hi @NDDD ,
You are not allowed to use column directly in the measure.Hence you need to use aggregate functions like sum,max,min etc.
It would be helpful if you could share your formula what you are trying with sample data and expected output.
BR,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
81 | |
75 | |
60 | |
37 | |
33 |
User | Count |
---|---|
101 | |
56 | |
51 | |
45 | |
40 |