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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
BugmanJ
Resolver I
Resolver I

A single value can not be determined problem with filter

Good Day All,

With the following measure:

 

Measure = 
CALCULATE(
COUNT('Tickets'[Ticket Number]),

FILTER (
ALL ('Tickets'[Operator]),
'Tickets'[Cost] < 25
)
)

 

It tells me that a single value for the 'Tickets'[Cost] can not be determinted and needs aggregating.

However, I can't aggregate as this forms part of a % calculation. If i remove the ALL filter then it works just fine, but I need the all so that i can have two lines, one where the operator is not filtered and one where the operator gets filtered

Some simple data if really needed:

Ticket NumberOperatorCost

15

Bob15
2000Joe28
2535Joe21
35688Harry26


Basically the filter should remove ticket numbers 15 and 2535 whilst ignoring the filter on the page of Operator

Thank you

1 ACCEPTED SOLUTION
BugmanJ
Resolver I
Resolver I

So for stopping the filter, this works:

Measure2 = 
CALCULATE(
COUNT('Tickets'[Ticket Number]),
ALL ('Tickets'[Operator]),
ALLEXCEPT(Tickets,Tickets[Cost]),
'Tickets'[Cost] < 25
)

View solution in original post

3 REPLIES 3
BugmanJ
Resolver I
Resolver I

So for stopping the filter, this works:

Measure2 = 
CALCULATE(
COUNT('Tickets'[Ticket Number]),
ALL ('Tickets'[Operator]),
ALLEXCEPT(Tickets,Tickets[Cost]),
'Tickets'[Cost] < 25
)
amitchandak
Super User
Super User

@BugmanJ , try one of the two ways

 

Measure =
CALCULATE(
COUNT('Tickets'[Ticket Number]),

FILTER (
'Tickets',
'Tickets'[Cost] < 25
)
)

 

or

 

Measure =
CALCULATE(
COUNT('Tickets'[Ticket Number]),

FILTER (
'Tickets',
'Tickets'[Cost] < 25
),ALL ('Tickets'[Operator])
)

Thanks that removes the error but doesnt stop filtering by the operator.

The entire calculation (as its a %) is

Measure = 
CALCULATE(
COUNT('Tickets'[Ticket Number])
)

/
(
CALCULATE(
COUNT('Tickets'[Ticket Number]),

FILTER (
ALL ('Tickets'[Operator]),
'Tickets'[Cost] < 25
)
)
)*100


This then gives a %

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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