Forum Discussion

cottrera's avatar
cottrera
Icon for Post Prodigy rankPost Prodigy
4 years ago
Solved

DAX ALL not working

Hi

 

I have a simple model with a facts table and dates table.  My report page has 5 visuals and the page has a filter on it for the current month = true. For one of my visuals with displays a score measure over time (By month) I do not want this visual effected by the page filter. Therefore I created a DAXfunction using ALL('Calendar') which I thought would remove the current month = true filter from the results.

 

Avg Rating all months =
CALCULATE([Avg Rating]
     ,ALL('Calendar'))
 
But is has not worked and the visual still only displays the currect month.  Can you please advise what I am doing wrong?
thank you
Richard
  • I'm guessing it's due to the fact that you you have a measure instead of a column to decide CurrentMonth. 
    Did you consider using a calculated column on the calendar table or using visual level filters on 4 of the visuals and not using the filter on the 5th visual?

6 Replies

  • I'm guessing it's due to the fact that you you have a measure instead of a column to decide CurrentMonth. 
    Did you consider using a calculated column on the calendar table or using visual level filters on 4 of the visuals and not using the filter on the 5th visual?

    • cottrera's avatar
      cottrera
      Icon for Post Prodigy rankPost Prodigy

      Hi NckolajJessen 

       

      My CurrentMonth is a ciolumn i the dates table. I already have it set up with 4 of the visuals set as 'True' and the remainding one not using the filter.
      I wanted to explore if there was a way to avoid adding 4 addtional filters to visuals as I am trying the keep the performace of the report good.

       

      Regards

       

      Richard

  • Hi Amitchadak, thank you for your quick reponse. I tried 

    Avg Rating all months =
    CALCULATE([Avg Rating]
    ,ALL())

    however the visual is still only showing the current month.

     

     

    regards

     

    Richard



  • MahyarTF's avatar
    MahyarTF
    Icon for Memorable Member rankMemorable Member

    Hi,

    it is weird,

    I try to create a sample data for my self and create a dax measure on it. it is work, would you please share your sample PBIX file to investigate :

     

    • cottrera's avatar
      cottrera
      Icon for Post Prodigy rankPost Prodigy

      Hi Mahya

       

      Due to company policy I am unable to share files.  The model is very simple



      The only filters on the page are

       

      My key measure is 

      Avg Rating = AVERAGE('LocalZ Feedback Files'[Rating])
       
      And for the visual that I wish to ignore the Page Filter I am using this measure
      Avg Rating all months =
      CALCULATE([Avg Rating]
           ,ALL('Calendar'))
       
      But have also tried
      Avg Rating all months =
      CALCULATE([Avg Rating]
           ,ALL())
       
      Both these measures work find when added to a card visual. However I am trying to display this via a line chart , showning the months on an axis.
      The result I was expecting is 



      But I am getting this

       

       

      Works fine in a card visual but not in a line chart.

       

      RIchard