Forum Discussion
DAX function / filter context issue
- 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
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