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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Syndicate_Admin
Administrator
Administrator

Do Calculation within SUMMARIZE

Hi, I'm new here and also in Power BI, I'm looking for a way to be able to do calculations within summarize when I create the table from another, I want to get the % of variation between two columns, I have this code and I want to place the % of variation in a separate column.

Tbl_DeparturesByColor = SUMMARIZE (

Sheet1,Sheet1[TYPE OF VARIETY],
"ActualTemp", SUMX(FILTER(Sheet1,[SEASON]="2023-2024"), [COMMERCIAL UNITS]),
"LastTemp", SUMX(FILTER(Sheet1,[SEASON]="2022-2023"), [COMMERCIAL UNITS])
)
)
With this I bring the two values in two columns, so far good, but I need to do the next operation and then insert it in a new column
DifSum = ActualTemp - LastTemp
DifSum / LastTemp => This result should go in a third column
Do you understand?
1 REPLY 1
amitchandak
Super User
Super User

@Syndicate_Admin , You have create measures

 

Create a separate table with distinct SEASON

 

Period = distinct(Sheet1[SEASON])

 

Join back with SEASON

 

In period table add a Rank column

 

Period Rank = RANKX(all(Period),Period[SEASON],,ASC,Dense)

 

Now Create a new measure


This Period = CALCULATE(sum('Sheet1'[COMMERCIAL UNITS]), FILTER(ALL(Period),Period[Period Rank]=max(Period[Period Rank])))


Last Period = CALCULATE(sum('Sheet1'[COMMERCIAL UNITS]), FILTER(ALL(Period),Period[Period Rank]=max(Period[Period Rank])-1))

 

Same as week on week

Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s

 

Power BI Custom Period Till Date (PTD)- https://youtu.be/rQ3Z_LtxwQM

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.