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
anblancopr
New Member

Calculating Daily Average from Hourly Data

Good evening. 

 

I'm trying to create a measure that will bring back a constant daily average in a table grouped by hour as shown in the image bellow. 

 

anblancopr_0-1680256652101.png

 

Im pulling the data from the following table 

 

anblancopr_1-1680256701805.png

 

So the constant daily average should be 0.81041 devided by the number of days selected in the filter that in this case is 2 days. 

 

My idea was to use the following DAX but it's bringing back the daily average for the perticular hour only 

 
anblancopr_2-1680256818121.png

 

Any help would be greatly appreciated. 

 

Thank you!!

1 REPLY 1
Anonymous
Not applicable

Hi @anblancopr ,

Please create a calculated column first.

Date_2 = DATE(YEAR('Fact_SCADA_Data'[Date]),MONTH('Fact_SCADA_Data'[Date]),DAY('Fact_SCADA_Data'[Date]))

And then create this measure.

Diurnal_DailyAvg_Folw =
VAR _days =
    COUNTROWS ( ALLSELECTED ( 'Fact_SCADA_Data'[Date_2] ) )
VAR _total =
    CALCULATE (
        SUMX (
            SUMMARIZE (
                ALLSELECTED ( 'Fact_SCADA_Data' ),
                'Fact_SCADA_Data'[Date],
                "Total FLOW", SUM ( 'Fact_SCADA_Data'[readvalue] )
            ),
            [Total FLOW]
        ),
        FILTER (
            'DIM_Signals',
            'DIM_Signals'[Data Type] = "Flow RATE"
                && 'DIM_Signals'[ITD SQL Server Table] = "AMR DATA"
        )
    )
VAR _result =
    DIVIDE ( _total, _days )
RETURN
    _result

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

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.

Top Solution Authors