cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Kaydee36 Frequent Visitor
Frequent Visitor

feed user's date selections into a measure to calculate value between those dates

I'm a total beginner trying to create a dashboard that allows users to calculate the difference between values associated with two dates.  e.g. price of 1 unit in march 2019 and the same unit in december 2018. Those dates would be specified by a filter. How do i reference filter selections in my measures?  Thank you 

4 REPLIES 4
edhans New Contributor
New Contributor

Re: feed user's date selections into a measure to calculate value between those dates

As long as the filter is on the page level, or at least the visual level where the measure will be used, simply using something like this will give you the first date in the filtered date range:

MIN('Date'[Date])

MAX() would give you the max.

 

Note though that if your filter is on the visual level and not the page level, the same measure could give you different results if used in multiple visuals.

Kaydee36 Frequent Visitor
Frequent Visitor

Re: feed user's date selections into a measure to calculate value between those dates

thank you . is that if the date is set in the visualizations pane, or with the end user selecting the dates in the dashboard itself? 

edhans New Contributor
New Contributor

Re: feed user's date selections into a measure to calculate value between those dates

That is if set in the new Filter Pane. How are they setting filters in the dashboard?

Kaydee36 Frequent Visitor
Frequent Visitor

Re: feed user's date selections into a measure to calculate value between those dates

The dashboard would be set up with a table or slicer (whatever can be referenced  by DAX)  listing  the date options. The user would then select the range of dates to compare, for example the value in Q12019 with the value of the same item in Q1 2018. they dont have access to the filter or visualizations or fields panes.