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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
erikzimm
Regular Visitor

Replace measure value with date slicer

Hi, 

 

I have a measure which is simply a division equation such as sum(value)/measure2 = final result. It works perfect, however the input on measure2 is a fixed number pulled (manually) from a data table where it has a Date field and the Value field. Simplified, it looks like this (it is daily data): 

Date          Value

1/1/2000    102.4

1/2/2000    105.6

1/3/2000    107.3

 

I have a date slicer, which slices my chart based on the data above, also no issues with this. The division equation previously stated is as follows: sum(value) / measure2 where measure2 = 102.4. 

 

What I want to know is how to allow the Date slicer to auto update measure2 to the new minimum value selected by the user. For example, the date slicer defaults to 1/1/2000 based on the data but if the user changed it to 1/3/2000, I want measure2 to not be 102.4 but 107.3 and thus produce a different result in the final result equation. 

 

 

 

1 ACCEPTED SOLUTION
vicky_
Super User
Super User

You can try and format your slicer to use the single-select option, and then use SELECTEDVALUE(Table[Value]) instead of measure2.

vicky__0-1701292152677.png

 

View solution in original post

3 REPLIES 3
vicky_
Super User
Super User

You can try and format your slicer to use the single-select option, and then use SELECTEDVALUE(Table[Value]) instead of measure2.

vicky__0-1701292152677.png

 

Hi - a follow up. Is there a way to allow my x axis to only display the dates >= to the selected date? Based on the example above, the selected values work as intended per your suggestion, however my x axis will still display 1/1/2000, 1/2/2000, 1/3/2000 etc. So, if the selected date is 1/2/2000 (and therefore the value is 105.6), I want my x axis to exclude/slice out anything <= 1/2/2000. 

Very helpful, thank you! 

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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