Forum Discussion

Chrisjr's avatar
Chrisjr
Icon for Helper IV rankHelper IV
3 years ago
Solved

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.

 

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 
  • 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) 

2 Replies

  • 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)