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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.