Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

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)

Elo4_0-1667399165510.png

 

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.

Elo4_1-1667399202341.png

 

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:

CALCULATE(
SELECTEDMEASURE(),
ALL(Stati[Status])
  ,ALL(customer)
)

 

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 5
vaibhavkale570
Resolver III
Resolver III

have you tried modifying the filter context in edit interactions?

Anonymous
Not applicable

as this only one chart with column and line , I can´t stop the status slicer interaction. I need it for the column.

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. 

Anonymous
Not applicable

I have never used field parameter. I read about it und checked the possibilities in PBI Desktop but I don´t how it can help me.

Maybe you have a concrete example similar to my case?

i Don't have the example but I might be abe to create one with sample dataset.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Top Kudoed Authors