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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

Help Table Conversion

Hello,

Please, can you help me?

 

I have a table with three fields: Date. Time (hour without minutes), and count (times hours repeats)

 I want to convert it as show in the images.

 

Thanks

I have thisI have thisI would like to have thisI would like to have this

2 REPLIES 2
m_dekorte
Resident Rockstar
Resident Rockstar

Hi @Anonymous 

 

You can pivot your data.

let
    Source = Table.FromRecords({
        [#"Received Date" = #date(2023, 7, 26), #"Received Time" = #time(3, 0, 0), Count = 1],
        [#"Received Date" = #date(2023, 7, 26), #"Received Time" = #time(7, 0, 0), Count = 2],
        [#"Received Date" = #date(2023, 7, 30), #"Received Time" = #time(6, 0, 0), Count = 3]
    }),
    PivotCol = Table.Pivot(
        Table.TransformColumnTypes( Source, {{"Received Time", type text}}, "en-US"), 
        List.Distinct( 
            Table.TransformColumnTypes( Source, {{"Received Time", type text}}, "en-US")[#"Received Time"]
        ), "Received Time", "Count", List.Sum
    )
in
    PivotCol

 

with this result 

m_dekorte_0-1698869002405.png

 

I hope this is helpful

 

Anonymous
Not applicable

Thanks

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.