cancel
Showing results for
Did you mean:

## Date selected as custom entry

Good morning.

Sorry for my clumsiness, I have a table with date and quantity, I have measurements that calculate the average and standard deviation of the last 31 days from the current date.

Using parameters I can change the base date and instead of the current date, I can move it 1,2,3,etc days, if today is 18/01/2022, by default it gives me those measurements for the max dates 18/01/2022 and min (18/01/2022)-31, but with parameter 3 part of 15/01/2022 until the previous 31 days.

It is very uncomfortable, since to visualize the data I have to select the parameter and then the date segmentation to match today()-parameter.

I am not able to make the date take it from a segmentation and with SELECTEDVALUE assign a start date of the measure, it always gives me the default value assigned in SELECTEDVALUE,I want to do it in a single step.

any ideas?, thanks

1 ACCEPTED SOLUTION
Community Support

Have you tried the What if parameters? You can change the value of this parameter directly in the slicer.

Create the following measures to calculate the maximum date and minimum date separately.

``MaxDate = MAXX ( ALLSELECTED ( Dates ), Dates[Date] ) - [Parameter Value]``
``MinDate = [MaxDate] - 31``

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 REPLIES 2
Community Support

Have you tried the What if parameters? You can change the value of this parameter directly in the slicer.

Create the following measures to calculate the maximum date and minimum date separately.

``MaxDate = MAXX ( ALLSELECTED ( Dates ), Dates[Date] ) - [Parameter Value]``
``MinDate = [MaxDate] - 31``

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I try it and I tell you.

Thanks a lot

Announcements

#### The Power BI Community Show

Welcome to the Power BI Community Show! Jeroen ter Heerdt talks about the importance of Data Modeling.

#### Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through June10th!

#### Check it Out!

Watch Session 22 Ted's Dev Camp along with past sessions!