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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Grevatious
Frequent Visitor

Creating a measure that uses values not selected in slicer

Hi Everyone,

 

I'm having a little bit of a problem trying to create a measure that uses values that are selected in a slicer with others that aren't selected. Let me explain it a little better.

 

So, I have this dataset:

 

Table: Transactions

Transaction idDateStatusRejection Message
11/1/2021Aproved 
21/2/2021Aproved 
31/3/2021RejectedCommunication Error
41/4/2021RejectedFraud
51/5/2021RejectedCommunication Error
61/6/2021Reversed 
71/7/2021Aproved 
81/8/2021Reversed 
91/9/2021RejectedInsuficient Funds
101/10/2021Aproved 

 

I have created a report that shows the detail information of all the rejected transactions. I also created 3 different slicers, one for the "Date", one for the transaction "Status" and the last one for the rejection "Message". So in this case I am trying to show all the rejected transactions caused by "Communication problems" whithin a certain date interval and also to calculate a rejection ratio which is something like: #Rejected transaction (by communication problems) / #Total Approved transactions.

And is this last part that I'm having problems with, trying to make the measure work because of the selected values in the slicers. I'm getting blanks and errors.

 

Now I have tried different approaches using ALL, EXCEPT, SELECTED VALUE but to no avail.

 

Could you please help me?

Thank you in advance!

 

1 ACCEPTED SOLUTION

Hey @Grevatious ,

 

you can remove the filter with the ALL function:

#Rejected transaction (by communication problems) =
CALCULATE(
    COUNTROWS( myTable ),
    myTable[Rejection Message] = "Communication Error",
    ALL( myTable[Status] )
)

 

Or for the approved transactions:

#Total Approved transactions =
CALCULATE(
    COUNTROWS( myTable ),
    myTable[Status] = "Approved",
    ALL( myTable[Status] )
)

 

The ratio should stay the same.

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

View solution in original post

3 REPLIES 3
selimovd
Super User
Super User

Hello @Grevatious ,

 

try the following measures:

#Rejected transaction (by communication problems) =
CALCULATE(
    COUNTROWS( myTable ),
    myTable[Rejection Message] = "Communication Error"
)

 

Then for the approved:

#Total Approved transactions = CALCULATE( COUNTROWS( myTable ), myTable[Status] = "Approved" )

 

And then at the end the ratio between these two:

Rejection Ratio =
DIVIDE(
    [#Rejected transaction (by communication problems)],
    [#Total Approved transactions]
)

 

Let me know if that worked.

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

Hey @selimovd thank you for your reply. Yes it works but because I have a "Status" slicer for the report, the "approved" measure doesn't work. In order for it to work It would have to somehow ignore those slicers.

Hey @Grevatious ,

 

you can remove the filter with the ALL function:

#Rejected transaction (by communication problems) =
CALCULATE(
    COUNTROWS( myTable ),
    myTable[Rejection Message] = "Communication Error",
    ALL( myTable[Status] )
)

 

Or for the approved transactions:

#Total Approved transactions =
CALCULATE(
    COUNTROWS( myTable ),
    myTable[Status] = "Approved",
    ALL( myTable[Status] )
)

 

The ratio should stay the same.

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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