Forum Discussion
rtaylor
Helper III
6 years agoSeletedValue function with Date Filter not displaying properly.
Hello and Thanks in Advance! I created a measure using selectedvalue function to display a category as a title. The problem is whenever I select any month to filter by, that isn't the first month...
v-lili6-msft
Community Support
6 years agohi rtaylor
For your case, it is because that there is no [Budget Summary Ovrhead] data in Aug 2019.
If you want it show Academic Year License Agreements - 8/1/2019 to 8/31/2019 instead of OHA Finances - 8/1/2019 to 8/31/2019 in your report although there is no [Budget Summary Ovrhead] data in Aug 2019, you could try this way to adjust your data model.
Step1:
Create a separate dim Budget Summary Ovrhead table by this formula
Dim Budget Summary Ovrhead = VALUES(BudgetMap[Budget Summary Ovrhead])
Step2:
Create the relastionship with BudgetMap table as below:
Note: cross filter direction is "Single"
Step3:
Use Budget Summary Ovrhead field from this new dim table as a slicer
Step4:
Adjust the VarianceReport_Monthly1 formula as below:
VarianceReport_Monthly1 =
Var DateRangemin = CALCULATE(min('Date'[Date]))
Var DateRangemax = CALCULATE(max('Date'[Date]))
Var filtername = SELECTEDVALUE('Dim Budget Summary Ovrhead'[Budget Summary Ovrhead],"OHA Finances")
Var reportrange = filtername & " - " & DateRangemin & " to " & DateRangemax
Return
reportrange
Regards,
Lin