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
Chrisjr
Helper IV
Helper IV

Display values on graph only when selection has been madse on multiple filters

Hello All, 

 

I have the following problem:  

I want a graph to display values only when values have been selected on both filtered but it won't work. 

 

Here is an example: 

 

1. The current configuration on my filteres is : the competitors filter will adjust itself based on the value selected on the Lookup filter.

Chrisjr_0-1674125881709.png

 

To do this, I created the following mesure: 

Measure =
VAR _typeid =
    SELECTEDVALUE ( LOOKUP[promo type ID] )
RETURN
    IF ( MAX ( 'FACT'[promo type ID] ) = _typeid, MAX ( 'FACT'[Competitor ID] ) )

 

2. to display the values only when selection has been made on both filters, I created the two following mesures: 

IsPromoTypeFiltered = IF(NOT ISFILTERED('LOOKUP'[promo type]) ,0,1)
IsCompetitorsFiltered = IF(NOT ISFILTERED(Competitors[competitor]), 0, 1)
 
My graph will already display values after selection has been made on the competitor filter.
 
What can I do to display values only when selection has been made on both filters and not only one filter?
 
 
Thanks for the help 
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Chrisjr , Change and && to OR || as per need in given measure

 

 

measure =var _1 = int(calculate( ISFILTERED('LOOKUP'[promo type]) ,allselected()))
var _2 int(calculate( ISFILTERED(Competitors[competitor]) ,allselected()))
return
if(_1= 1 && _2=1, 1,0) 

View solution in original post

2 REPLIES 2
Chrisjr
Helper IV
Helper IV

Thanks a lot @amitchandak , it works fine 🙏🙏

amitchandak
Super User
Super User

@Chrisjr , Change and && to OR || as per need in given measure

 

 

measure =var _1 = int(calculate( ISFILTERED('LOOKUP'[promo type]) ,allselected()))
var _2 int(calculate( ISFILTERED(Competitors[competitor]) ,allselected()))
return
if(_1= 1 && _2=1, 1,0) 

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.