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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Multiple columns cannot be converted to a scalar value (with format function)

Hi,

I have a table (A) with titles of books and their reading time as duration.
I have a second table (B) with reading times as provided by the publisher.
The relationship between the tables is based on table and is many to one.

Table A looks like this:
customer 1 - bookA - reading time (duration)
customer 2 - bookA - reading time (duration)
customer 3 - bookB - reading time (duration)

Table B looks like this:
bookA - expected reading time (duration)

bookB - expected reading time (duration)
bookC - expected reading time (duration)

In the Power Query editor I already transformed both of the reading time columns to duration by using this:
Tabel1 = Table.TransformColumnTypes(Tabel1_Table,{{"reading time", type time}}),
DateTimeToDuration = Table.TransformColumns(Tabel1,{{"reading time", each _ - #time(0,0,0), type duration}})

With the FORMAT function I transformed to reading time from table A to a text value and calculated the average with:

avgTime = FORMAT(
AVERAGE('reading time'[reading time]); "HH:MM:SS")


Now I also need to format the expected reading times from table B. But since those are just 1 per book title it has no use to use something like AVERAGE. Something like ALL in combination with FORMAT gives me the above in the title of this post mentioned error. 

Any ideas?
Many thanks!



1 ACCEPTED SOLUTION
Anonymous
Not applicable

HI @Anonymous,

AFAIK, current power bi does not support duration type of values.
I'd like to suggest you convert it to total second and write a calculated field to transform the total second to text value with duration strings. (you can aggeration on the total second field)

Aggregating Duration Time  

Regards,
Xiaoxin Sheng

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

HI @Anonymous,

AFAIK, current power bi does not support duration type of values.
I'd like to suggest you convert it to total second and write a calculated field to transform the total second to text value with duration strings. (you can aggeration on the total second field)

Aggregating Duration Time  

Regards,
Xiaoxin Sheng

parry2k
Super User
Super User

@Anonymous you need to add this as a column to Format value on Table B, if you adding as a measure then use some aggregated function like MIN or MAX and then you will not get this message. 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.