Forum Discussion

Richard_Halsall's avatar
5 years ago

Filtering visual measure with another measure

Hi,

 

I have a table visual which returns contractor names based on a number of slicer selections and a card visual 'Total Technicians' which showed the measure TotTechs = COUNT(DimContractor[Id]) both matched fine until...

 
I then added an 'And/Or' measure against the slicer 'Name' which allows me to apply AND logic to multiple selections in the slicer instead of the usual OR behaviour
 
Against the table visual I then use the measure below with the value 'is 1'as a filter
 
Course_ANDOR_Check =
IF(
[Selected_counter] = 0,
1,
IF(
DISTINCTCOUNT(DimCerts[Name]) = [Selected_counter],
1,
[Selected_AndOr]
)
)
 
 
The table visual returns the correct number of records i.e. 5  but the card visual does not
 
How do I filter the card visual with the above measure
 
Dashboard is below
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Any help would be appreciated

2 Replies

  • Richard_Halsall , measure is calculated run time. Means any grouping you need to compare need to forced

    example, force calculation at status level

     

    Course_ANDOR_Check = Sumx(values(DimCerts[status]),
    IF(
    [Selected_counter] = 0,
    1,
    IF(
    DISTINCTCOUNT(DimCerts[Name]) = [Selected_counter],
    1,
    [Selected_AndOr]
    )
    ))

    • Richard_Halsall's avatar
      Richard_Halsall
      Icon for Helper IV rankHelper IV

      amitchandak Hi thanks for the speedy response I have tried your solution and what it actually gives me is the count of selected values in the slicer.

       

      What I would like is the count of the records returned in the table visual which shows contractor IDs meeting the criteria for selected value 1 AND value 2 in the slicer 'Name'

       

      In the screenshot shown I have selected 2 values in the slicer 'Name' which has correctly given me 5 records in the table e.g.  5 contractor id records

       

      but the card visual shows 643 which is a count of the records for contractor id's relating to value 1 OR value 2 in the slicer 'Name'