Forum Discussion

kmes40505's avatar
kmes40505
Frequent Visitor
7 years ago
Solved

ALLSELECTED with specific column

I'm using multiple slicers. The goal is to select a subtable of one slicer out of the original whole data(not affected by other slicers if the user use any of them)

 

ALLSELECTED('table'[targetColumn]) doesn't work since this would still be affected by the other slicers

  • parry2k's avatar
    parry2k
    7 years ago

    kmes40505 your measure should be

     

    TotalCount = CALCULATE(SUM(Sheet1[count]),ALLEXCEPT(Sheet1, Sheet1[targetSlicer]))

7 Replies

  • kmes40505 i just tested, a table with 3 column and following measure give me count of all rows regardless if user slicer the data from another columns

     

     

    Measure = 
    VAR x = CALCULATETABLE( ALLSELECTED(  Table1[Column1] ) )
    RETURN
    COUNTROWS( x )
    
    • kmes40505's avatar
      kmes40505
      Frequent Visitor

      the actual code i use is this:

      (all of the following are measure)

       

      totalCount = CALCULATE(SUM('table'[count]),ALLSELECTED('table'[targetSlicer]))
       
      and later on i want to test for percentage of other slicer(individually) out of the targetSlicer
       
      TotalPercentage = SUM('table'[count]) / [totalCount]
      but i found out totalCount changes whenever i select other slicer. which should not happen
      • parry2k's avatar
        parry2k
        Super User

        kmes40505 are you open to share sample data? Your measures have all different columns,