Forum Discussion
Arthur_NS
4 years agoHelper I
Evolution with condition
Hi all, I have a pretty straightforward table with 3 columns: Year | Number of sales | YOY Basically what I would like to do is calculate the YoY evolution of sales. The only twist is that ...
Arthur_NS
4 years agoHelper I
Thanks but I get this
Samarth_18
4 years agoCommunity Champion
Arthur_NS try this:-
measure =
VAR selected_year =
SELECTEDVALUE ( table[year] )
RETURN
CALCULATE (
SUM ( table[number of sales] ),
FILTER ( table, int(table[year]) = int(selected_year) - 1 && table[YOY] = "Yes" )
)