Forum Discussion
ALL function not working
Hi All,
I have a problem with a metric containing ALL. It´s not working when selecting only one items in my slicer (based on a calculation group with IF(SELECTEDVALUE).
What do I want to show on my dashboard: revenue per customer status in column chart and a line with all customer status together (sum)
Problem is: when I only select one status in my slicer (it doesn´t matter which one), the all Line is showing the value of the selected status instead of all status together.
I think the problem is coming from the selectedmeasure function in the calculation group:
I have several variables , each one per status and at the end my metric is based on a IF(SELECTEDVALUE:
VAR revenue_premium =CALCULATE(SUM(transaction[revenue]), customer[status]="Premium")
.......
RETURN
IF(
SELECTEDVALUE('Stati'[Status])="Premium",revenue_premium,
IF(SELECTEDVALUE('Stati'[Status])="Basic",revenue_basic,
IF(SELECTEDVALUE('Stati'[Status])="Basic+",revenue_basic_plus,
revenue_total
)))
My separate metric used by the line in the dashboard is:
So I´m removing any status from the metric but I think it is going on the SELECTEDVALUE and this is why my ALL metric is not working when I select only one status.
How can I change my IF(SELECTEDVALUE function so that the other metric containing the ALL function is working properly?
Any ideas?
Thanks
5 Replies
- vaibhavkale570Resolver III
have you tried modifying the filter context in edit interactions?
- AnonymousNot applicable
as this only one chart with column and line , I can´t stop the status slicer interaction. I need it for the column.
- vaibhavkale570Resolver III
you should use the feild parameter for this visual if its possible for you. line will show total value even if you select the value in the slicer.