Forum Discussion
Anonymous
5 years agoNot applicable
Need help on conditional format previous week sales
Hi, I want this table to show icons (arrows up, down or equal) if the previous week sales is higher, lower or equal to the sales of the week of that column. Eg: Sales of "boller" in week 43 is higher...
AlB
Community Champion
5 years agoHi Anonymous
Are you asking how to build the measure or how to display the arrows? Or both?
For the measure try this:
Icon =
VAR currentWeekVal_ =
CALCULATE ( SUM ( Datagrunnlag[Antall solgt] ) )
VAR previousWeekVal_ =
CALCULATE (
SUM ( Datagrunnlag[Antall solgt] ),
FILTER (
ALL ( Datagrunnlag[Week number] ),
Datagrunnlag[Week number]
= MAX ( Datagrunnlag[Week number] ) - 1
)
)
VAR _val = currentWeekVal_ - previousWeekVal_
RETURN
SWITCH ( TRUE (), _val < 0, -1, _val = 0, 0, _val > 0, 1 )
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers