Forum Discussion
Conditional filtered average in line chart
- 5 years ago
Hi Anonymous
If I understand correctly, you always want the value for the country regardless of the level selected at the slicer. If so:
Measure = VAR country_ = SELECTEDVALUE ( Data[Country] ) RETURN CALCULATE ( SUM ( Data[Sales] ), Data[Country] = country_, ALL ( Data[Region], Data[City] ) )Or since you have Country in the legend, this should suffice:
Measure = CALCULATE ( SUM ( Data[Sales] ), ALL ( Data[Region], Data[City] ) )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
Hi Anonymous
If I understand correctly, you always want the value for the country regardless of the level selected at the slicer. If so:
Measure =
VAR country_ = SELECTEDVALUE ( Data[Country] )
RETURN
CALCULATE (
SUM ( Data[Sales] ),
Data[Country] = country_,
ALL ( Data[Region], Data[City] )
)
Or since you have Country in the legend, this should suffice:
Measure =
CALCULATE (
SUM ( Data[Sales] ),
ALL ( Data[Region], Data[City] )
)
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
- Anonymous5 years agoNot applicable
This works like a charm, thanks so much!
Have a good one 🙂