Forum Discussion

gbrunnerbi's avatar
gbrunnerbi
Advocate I
6 years ago
Solved

DAX function / filter context issue

Hi,   I need some help with filter contexts and dax formulas.   My setup is this: I have a EndQuarter - ENDDATE - selector (slicer) (e.g. 9/30/2019) - which filters all values in my data table -...
  • gbrunnerbi's avatar
    6 years ago

    I was just able to actually solve this:

     

    -I created a new table (basically duplicating one of my queries)

    -Added a column calculating the values that I need (you have to adapt it since it is not a measure of course, like removing aggregators and replacing them with the actual columns in your table)

     

    Now I created a measure which should be displayed in my visual.

    e.g. CALCULATE ( SUM ('table'[Value))

    I used REMOVEFILTERS to get rid of the slicer selection (this selection forced me to stay within the quarter which the user selected)

    And now I could use DATESBETWEEN('Dates'[Date] , FIRSTDATE('Table'[Date]) , LASTDATE('Dates'[Date] )

    to actually get the time period that I wanted to look at, in my visual.

     

    Now whatever quarter the user selects will be the last data point on my visual.

     

    If someone has a similar problem and my solution is not clear, please pm me