Forum Discussion

SR1's avatar
SR1
Icon for Helper I rankHelper I
8 years ago
Solved

Measure not in sync with slicers

Hi,

 

I have created a measure that counts the number of rows based on Date & Name column.

However the measure is not getting changed according to the slicer selection. Please help me find the issue.

 

Here is my code:  

CountVal = CALCULATE ( COUNTROWS (Sample), ALLEXCEPT (Sample,Sample[Date], Sample[Name] ) ) 

 

Sample table:

 

 

I am using date dimension for the date slicer.

 

Thanks!

 

  • Also:

     

    CountVal1 = CALCULATE ( COUNTROWS ('Sample'), ALLEXCEPT ('Sample','Calendar'[Date], 'Sample'[Name] ) ) 

7 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity Champion

    Also:

     

    CountVal1 = CALCULATE ( COUNTROWS ('Sample'), ALLEXCEPT ('Sample','Calendar'[Date], 'Sample'[Name] ) ) 
  • Greg_Deckler's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity Champion

    Dumb question, is your Date dimension related to your fact table?

    • SR1's avatar
      SR1
      Icon for Helper I rankHelper I

      Yes. Other measures created on this fact table are in sync with the slicers.

       

       

      • Greg_Deckler's avatar
        Greg_Deckler
        Icon for Community Champion rankCommunity Champion

        Right, see my second response, you need to ALLEXCEPT your date dimension, not your fact table for the date at least.