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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
LautaroAA
Regular Visitor

Sum values by category and between hours of day.

Hello, i have a table with 3 columns: "key", "value" and "timestamp" 

7530fd74d322a0a16cc96fd1faed1109.png

and i need to sum all the values of key "16" between 1 PM and 2 PM, then 2 PM and 3 PM and so on.
Hope someone can help me with this, thanks in advance.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@LautaroAA 

 

Create a column that will only hold the [Bracket]s ("1PM-2PM", "2PM-3PM",...) and then create another table with a simple formula:

 

[Table] =
SUMMARIZECOLUMNS(
    T[Bracket],
    treatas(
        {"16"},
        T[key]
    ),
    "Count", SUM( T[value] )
)

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

@LautaroAA 

 

Create a column that will only hold the [Bracket]s ("1PM-2PM", "2PM-3PM",...) and then create another table with a simple formula:

 

[Table] =
SUMMARIZECOLUMNS(
    T[Bracket],
    treatas(
        {"16"},
        T[key]
    ),
    "Count", SUM( T[value] )
)

Thank you!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.