Forum Discussion

cosminc's avatar
cosminc
Post Partisan
7 years ago

Measure with specific filter ignored on interaction with table

Hi all,

i have a pivot table (matrix) and a slicer; the slicer interaction with the table is taken so that the table show all dimension values 

and i want to create a measure which calculates count for selected value on slicer; ignoring the header dimension (A,B,C,D)

the figures need to be for A

 

matrix example

Brand      A         B             C              D

Sales1      10        10           10           10

Sales2      20         20          20           20

Sales3       25         25          25          25

 

where Sales1, Sales2 and Sales3 for A are 10, 20 & 25

the slicer selection is A

 

the measure is 

measure =
VAR Brand_selected =
SELECTEDVALUE ( source[Brand] )

RETURN
CALCULATE(count(source[Value], FILTER(source,source[Value]<2 && source[Brand]=Brand_selected)))

 

can you help me with the correct syntax?

thanks,

Cosmin

 

 

 

 

3 Replies

  • v-frfei-msft's avatar
    v-frfei-msft
    Community Support

    Hi cosminc ,

     

    Could you please share your sample data and excepted result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.

     

    • cosminc's avatar
      cosminc
      Post Partisan

      Hi

      please find below a sample

      the results which i need are already put on first post

      Thanks,

      Cosmin

       

       

      CategoryValue
      Sales 11
      Sales 20
      Sales 31
      Sales 10
      Sales 21
      Sales 30
      Sales 11
      Sales 21
      Sales 31
      Sales 11
      Sales 21
      Sales 31
      Sales 11
      Sales 21
      Sales 31
      Sales 11
      Sales 21
      Sales 30
    • cosminc's avatar
      cosminc
      Post Partisan

      keep in mind please that there are also other columns which i use as filters

      so i can't use in measure All to ignore selections

      thanks,

      Cosmin