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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Yagevendra
Helper IV
Helper IV

Dynamic Title with date slicer

Hi all, is there any way to create dynamic title with selection of date from the drop-down filter?

My requirement is to create a dynamic title if user select any date from the date slicer the title should change the number in title suppose today is 10/05/2022 we need to show today data + (today - 28 days) data in chart and for title it should show 28 days data.

If my date start from 1 February 2022 and user select this date so title should change and show 1 days data.

if user select 2 February data it should show 2 days of data (Today+ (today-last 28 days data).

Please help to resolve this type of scenario.

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

Hi @Yagevendra ,

 

Please try the measure.

 

Title = 
MIN (
    CALCULATE (
        DISTINCTCOUNT ( 'Table'[Date] ),
        FILTER ( 'Table', 'Table'[Date] <= MAX ( Dates[Date] ) )
    ),
    28
) & " Days"

vkkfmsft_0-1652410067220.pngvkkfmsft_1-1652410085669.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

4 REPLIES 4
v-kkf-msft
Community Support
Community Support

Hi @Yagevendra ,

 

Please try the measure.

 

Title = 
MIN (
    CALCULATE (
        DISTINCTCOUNT ( 'Table'[Date] ),
        FILTER ( 'Table', 'Table'[Date] <= MAX ( Dates[Date] ) )
    ),
    28
) & " Days"

vkkfmsft_0-1652410067220.pngvkkfmsft_1-1652410085669.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.

 

Arul
Super User
Super User

@Yagevendra ,

I hope this measure would help you,

Dynamic Title = IF(HASONEVALUE(Table_count[Date])=TRUE(), SELECTEDVALUE(Table_count[Date]) &"-"&"Last 28 days data",BLANK())

Without Slicer Selection:

Arul_0-1652184871985.png

With Slicer Selection:

Arul_1-1652184914955.png

Thanks,

Arul

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


LinkedIn


Hi @Arul

thanks for your reply, If I consider your scenario, Date in header should be in integer values 
if user select min date from the filter it should show 1 if user select 2nd of Jan date it should show 2.
suppose we have 30 days of data if user select 29 of Jan it should show 28 because we are showing last 28 date of data on each date.

@Yagevendra ,

 

Okay, How is expected output should be shown in your report?

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


LinkedIn


Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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