Forum Discussion

kelalfbry's avatar
kelalfbry
New Member
6 years ago
Solved

Filter matrix by slicer using disconnected table

Illustration 1Illustration 2

  • kelalfbry's avatar
    kelalfbry
    5 years ago

    I got it to work by using the following disconnected table: ProductType

    Description                                                Search Value

    ALL FRESH                                                 FRESH

    ALL YIELDED AND SELECT FRESH ITEMS  YIELDED

     

    I added the following visual filter, where 'Show items when the value:' 'is' 'True 

    IsFiltered =
    IF(
    SUMX('ProductType',
    FIND(
    'ProductType'[SearchValue],
    MAX('DailyBaseProduct'[ProductFilter]),,0)) > 0,
    "True",
    "False"
    )

3 Replies

  • kelalfbry, try these measures:

     

    Avg Qty = AVERAGE ( Table[QTY] )
    
    Avg Qty Base Item 1 =	CALCULATE ( [Avg Qty], Table[BaseItem] = 1 )
    
    Avg Qty Base Item Version =
    VAR vSelBaseItem =
        SELECTEDVALUE ( SlicerTable[Code] )
    VAR vResult =
        SWITCH ( vSelBaseItem,
    	0, [Avg Qty],
    	1, [Avg Qty Base Item 1]
         )
    RETURN
        vResult

     

    The third measure (Avg Qty Base Item Version) is the one you put in your matrix.

    • kelalfbry's avatar
      kelalfbry
      New Member

      Thanks, i will give it a try and let you know.

    • kelalfbry's avatar
      kelalfbry
      New Member

      I got it to work by using the following disconnected table: ProductType

      Description                                                Search Value

      ALL FRESH                                                 FRESH

      ALL YIELDED AND SELECT FRESH ITEMS  YIELDED

       

      I added the following visual filter, where 'Show items when the value:' 'is' 'True 

      IsFiltered =
      IF(
      SUMX('ProductType',
      FIND(
      'ProductType'[SearchValue],
      MAX('DailyBaseProduct'[ProductFilter]),,0)) > 0,
      "True",
      "False"
      )