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

Calculate daily average per host per day from hourly data

Hi All, 

 

I am new to power BI and new to the report development as well, with almost no knowledge in design.

 

I have hourly CPU usage data  , as attached , for multiple servers .

cpudata.png

 

i want to calculate Daily Average per server  and then based on daily average i want to divide them into 3 buckets red(more than 80 average) , yellow(60-80) and green(0-60)

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @riteshsharma25 ,

According to your statement, I think you may want to calculate the sum of [avg_cpu_pct] by hostname and then mark them into 3 buckets with following logic: red(more than 80 average) , yellow(60-80) and green(0-60).

Buckets = 
VAR SUM_AVG = CALCULATE(SUM('Table'[avg_cpu_pct]))
RETURN
SWITCH(TRUE(), SUM_AVG<=60,"Green",SUM_AVG>60 && SUM_AVG<=80,"Yellow","Red")

Result in my sample is as below.

vrzhoumsft_0-1721357619401.png

 

Best Regards,
Rico Zhou

 

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

1 REPLY 1
Anonymous
Not applicable

Hi @riteshsharma25 ,

According to your statement, I think you may want to calculate the sum of [avg_cpu_pct] by hostname and then mark them into 3 buckets with following logic: red(more than 80 average) , yellow(60-80) and green(0-60).

Buckets = 
VAR SUM_AVG = CALCULATE(SUM('Table'[avg_cpu_pct]))
RETURN
SWITCH(TRUE(), SUM_AVG<=60,"Green",SUM_AVG>60 && SUM_AVG<=80,"Yellow","Red")

Result in my sample is as below.

vrzhoumsft_0-1721357619401.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.