Forum Discussion
lou_powerbi
3 years agoRegular 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....
lou_powerbi
3 years agoRegular 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