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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Anonymous
Not applicable

Multiply a time count

Hi All, 

 

I am new to PBI and I need some support, I am trying to multiply the values sitting on top of the bar graphs by the time values at the bottom of the graph. 

PBIStudy123_0-1631538819358.png

The values is a count of Time, so in the image its showing that there are 4 ID values x 00:30:00 and the end result I would like to see is 4 x 00:30:00 = 02:00:00 as the whole time of the 4 ID's in the graph. 

 

The field is currently looking at the count of the column Time and the Axis are ID numbers- 

 

PBIStudy123_1-1631539056496.png

I know from past experience that we are unable to do this with a TEXT column so can anyone give me some advice as to how I can achieve the amount of ID numbers x count of ID time logged. 

 

Thanks 

 

 

 

 

1 ACCEPTED SOLUTION

Hi @Anonymous ,

You can try this measure to get the result but actually text value could not be used in the bar chart singlly.

Total Time =
CONVERT (
    CONVERT (
        CONVERT ( CONVERT ( SELECTEDVALUE ( 'Table'[Time] ), DATETIME ), DOUBLE )
            * COUNT ( 'Table'[ID] ),
        DATETIME
    ),
    STRING
)

vyingjl_0-1631756760140.png

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi, 

 

First of all thank you for reaching out, secondly I have tried and it didn't work.. 

PBIStudy123_0-1631555267393.png

Are you able to suggest a way to get the TIME column on the left side * right column to create a third column with the total that equals 02:00:00.

 

I had a look at your links but it doesn't seem to work for what I want to achieve as it was putting the values into seconds but I just want to multiply the 2 columns by eachother to create a total. Is there a measure I could possibly write for this?

 

thanks

 

 

Hi @Anonymous ,

You can try this measure to get the result but actually text value could not be used in the bar chart singlly.

Total Time =
CONVERT (
    CONVERT (
        CONVERT ( CONVERT ( SELECTEDVALUE ( 'Table'[Time] ), DATETIME ), DOUBLE )
            * COUNT ( 'Table'[ID] ),
        DATETIME
    ),
    STRING
)

vyingjl_0-1631756760140.png

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Greg_Deckler
Community Champion
Community Champion

@Anonymous I think you want something like time aggregation.
Duration
You will need to convert those to seconds, add them and essentially convert them back more or less. Look at the links below, they should get you what you need.
https://community.powerbi.com/t5/Quick-Measures-Gallery/Chelsie-Eiden-s-Duration/m-p/793639#M389
https://community.powerbi.com/t5/Community-Blog/Aggregating-Duration-Time/ba-p/22486
https://community.powerbi.com/t5/Quick-Measures-Gallery/Duration-to-Seconds-Converter/m-p/342279#M92



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.