cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Syndicate_Admin
Administrator
Administrator

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
v-kkf-msft
Community Support
Community Support

Hi @Syndicate_Admin ,

 

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

 

vkkfmsft_0-1642746266304.png

 

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

 

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

vkkfmsft_1-1642746683126.png  vkkfmsft_2-1642746696691.png

 

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.

 

View solution in original post

2 REPLIES 2
v-kkf-msft
Community Support
Community Support

Hi @Syndicate_Admin ,

 

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

 

vkkfmsft_0-1642746266304.png

 

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

 

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

vkkfmsft_1-1642746683126.png  vkkfmsft_2-1642746696691.png

 

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

Helpful resources

Announcements
May 23 2022 epsiode 5 without aka link.jpg

The Power BI Community Show

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

charticulator_carousel_with_text (1).png

Charticulator Design Challenge

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

Power BI Dev Camp Session 22 without aka link and time 768x460.jpg

Check it Out!

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

Power BI Release May 2022 768x460.png

Check it out!

Click here to read more about the May 2022 updates!

Top Kudoed Authors