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
saiftv
Frequent Visitor

create visualization that sum LOAD_MW for all grid_code and display today, yesterday and last year

Can anyone help me please, I’m new in power bi,

On the table below I want to create visualization that sum all Load_mw for all grid_code for each R_Time for each day in R_date and to compare today load, yesterday and last year load

I created the visualization below for today time but I need to add yesterday and last year

 

 

 

table.jpg

 

 

visualization sample.jpg

 
1 ACCEPTED SOLUTION
saiftv
Frequent Visitor

hi,

 

it works, i used below calculate

 

last_year =
(CALCULATE(
    SUM ( GRID_LOAD[LOAD_MW] ),
    ALLEXCEPT ( GRID_LOAD, GRID_LOAD[R_TIME]),
    DATEADD( ( GRID_LOAD[R_DATE]), - 1,YEAR)))

View solution in original post

3 REPLIES 3
mwegener
Most Valuable Professional
Most Valuable Professional

Hi @saiftv ,

 

create a date table and link it to your table.

 

Date = CALENDARAUTO()

 

Mark the date table as date table.

https://docs.microsoft.com/en-us/power-bi/desktop-date-tables

 

 

Prev Day = CALCULATE(SUM('Table'[LOAD_MW]), PREVIOUSDAY('Date'[Date]))  
Prev Year = CALCULATE(SUM('Table'[LOAD_MW]), PREVIOUSYEAR('Date'[Date]))  

 

If I answered your question, please mark my post as solution, this will also help others.

Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


Hi mwegener

For the prev day is working fine, for the prev year it sum all previous year load_wm. I want something like this. Sum all load_wm of all grid_code for the hour 0.00, then for 1.00 and so on for today, and for yesterday and for the same date of last year.

saiftv
Frequent Visitor

hi,

 

it works, i used below calculate

 

last_year =
(CALCULATE(
    SUM ( GRID_LOAD[LOAD_MW] ),
    ALLEXCEPT ( GRID_LOAD, GRID_LOAD[R_TIME]),
    DATEADD( ( GRID_LOAD[R_DATE]), - 1,YEAR)))

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Top Solution Authors