Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Kaydee36
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
Super User
Super User

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.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

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? 

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



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

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.    

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.