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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
MiriamLeischner
Regular Visitor

User-Maintainable Date Parameter

Hello,

I am currently working on a dashboard where I would like to add a date parameter that the Viewer-User of the dashboard can maintain and therefore change the data he sees. I would like to have this as an alternative to the date filter because of the complexity of the measures. 

But in PBI Desktop I only see parameters in number format, in Power Query I have the possibility to create date parameters but I have found no way of giving the user the opportunity to choose a date in the Dashboard. Is there any way to do it?

 

1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

Hi  @MiriamLeischner ,

I created some data:

vyangliumsft_0-1649052722656.png

You can create a date table, create a relationship with the table according to the date column, Keep the relationship is Inactive.

vyangliumsft_1-1649052722659.png

Here are the steps you can follow:

1. Create calculated table.

Date2 = CALENDAR(MIN(Data1[Date]),MAX(Data1[Date]))

2. Result:

This way the slicer's date will always be between the table's min date and max date

vyangliumsft_2-1649052722660.png

This is the related document, you can view this content:

https://www.mssqltips.com/sqlservertip/4475/using-parameters-in-power-bi/

https://community.powerbi.com/t5/Desktop/How-to-pass-the-date-parameters-in-PQ-Query/m-p/167291

Please click here for the pbix file.

 

Best Regards,

Liu Yang

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

1 REPLY 1
v-yangliu-msft
Community Support
Community Support

Hi  @MiriamLeischner ,

I created some data:

vyangliumsft_0-1649052722656.png

You can create a date table, create a relationship with the table according to the date column, Keep the relationship is Inactive.

vyangliumsft_1-1649052722659.png

Here are the steps you can follow:

1. Create calculated table.

Date2 = CALENDAR(MIN(Data1[Date]),MAX(Data1[Date]))

2. Result:

This way the slicer's date will always be between the table's min date and max date

vyangliumsft_2-1649052722660.png

This is the related document, you can view this content:

https://www.mssqltips.com/sqlservertip/4475/using-parameters-in-power-bi/

https://community.powerbi.com/t5/Desktop/How-to-pass-the-date-parameters-in-PQ-Query/m-p/167291

Please click here for the pbix file.

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.