Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I have a dataset that has a table of records with start and end dates and a period table that has the start and end dates of each period. I have a set of flag measures that creates a dynamic filter to show only active records that fit between a selected start and end date. Now what I need to do is have another option for the user to select N days before the start of the period and show active records based on that. I've been trying to use something like this:
Measure = DATEADD(Calendar[Date], SelectedValue(NDays), DAY)
*NDays would be the value a user would select in a slicer
So far this hasn't worked for me but I'm sure there is a way to do this. Any ideas?
Solved! Go to Solution.
You can have measure like
10 Days behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],10,DAY))
You can use what if measure
https://docs.microsoft.com/en-us/power-bi/desktop-what-if
N Days behind Sales =
var _max =max(Whatif[Whatifmeasure])
return
CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],_max,DAY))
Hi @Al345
If you've fixed the issue on your own please kindly share your solution. if the above posts help, please kindly mark it as a solution to help others find it more quickly.thanks!
Hi,
See if my solution here helps.
You can have measure like
10 Days behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],10,DAY))
You can use what if measure
https://docs.microsoft.com/en-us/power-bi/desktop-what-if
N Days behind Sales =
var _max =max(Whatif[Whatifmeasure])
return
CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],_max,DAY))
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
144 | |
85 | |
66 | |
51 | |
45 |
User | Count |
---|---|
217 | |
89 | |
82 | |
66 | |
57 |