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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
lou_powerbi
Regular Visitor

Need to compare two columns dynamically from visual "Matrix"

Hi there,

Good afternoon

I have a scenario that I need  to calculate % difference between two columns in the visual for my Fcast Volume by week.

In this case, I have two weeks 38/2022 and 39/2022. So goal is calculate difference in % for the Fcast Volume to show it in the report

I created a mesaure and tried to use it but it's not working

 

Measure_Fcast_previous = CALCULATE(SUM('DP Fcast (2)'[Fcast Volume(in EA) by Location])
, FILTER(ALL('Calendar')
, 'Calendar'[Year] = SELECTEDVALUE('Calendar'[Year]) &&
'Calendar'[Week] = SELECTEDVALUE('Calendar'[Week])-1))
 
 
Need to compare values between two columns in red and show in rptNeed to compare values between two columns in red and show in rpt

 

Any help on it?
Thx
lou
 
1 REPLY 1
lou_powerbi
Regular Visitor

I came up with alternate solution but how can make the weeks dinamically

 

% Volume diff =
var w_previous = CALCULATE(VALUES('DP Fcast (2)'[Fcast Volume(in EA) by Location]),'DP Fcast (2)'[Week_final] = "39-2022/09")
var w_current = CALCULATE(VALUES('DP Fcast (2)'[Fcast Volume(in EA) by Location]),'DP Fcast (2)'[Week_final] = "40-2022/09")

var diff = w_current - w_previous
var total = (w_current + w_previous) / 2
var diff_perc = diff / total
var result = diff_perc
return result
 
But how can I make the weeks dinamically sed on slicer?
 
thx
PowerbiScreenshot 2022-09-27 092624.jpg

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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