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

Shape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.

Reply
Greg_Deckler
Super User
Super User

ISFILTERED, HASONEFILTER and Visual Filters

This technique is useful if you only want to display things when they are filtered or have a single filter, for example.

 

1. Create a measure like (the * 1. turns the True/False into a numeric value

IsFiltered = ISFILTERED(Locations[State]) * 1.

2. Change the type of the measure to Whole Number.

3. Add "IsFiltered" to your Visual Level Filters. 

4. Set the filter it to only display when IsFiltered = 1.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
1 REPLY 1
AlAlawiAlawi
Helper I
Helper I

Hello There;

 

Would truely appreciate your insight on my code below and how i can accomodate ISFILTERED ..

Lost Sales = IF(OR(Leads[Lead Status]="7-LOST SALE",Leads[Lead Status]="X"),IF(AND(COUNTROWS(FILTER(Leads,[Sold T]=EARLIER(Leads[Customer ID]) && [Year]=EARLIER(Leads[Year]) && [New/Used]=EARLIER(Leads[New/Used]) && [Brand]=EARLIER(Leads[Brand]) ))<1,COUNTROWS(FILTER(Leads,[Open]=EARLIER(Leads[Customer ID]) && [Year]=EARLIER(Leads[Year]) && [New/Used]=EARLIER(Leads[New/Used]) && [Brand]=EARLIER(Leads[Brand])))<1),[Customer ID],0),0)

Basically I am Filtering out the [Sold T] & [Year] & [New/Used] & [Brand] Column while checking if the [Customer ID] fits the criteria.

 

I want to use ISFILTERED as a function to check that these filters apply only when the data on each column had been applied.

 

So if the [Year] is filtered then only the year filter would apply, else not ...

Then if the [Year} & [Brand] are filtered then both Filters would apply and so on ...

 

Thank you in Advance for reading my post.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.