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
Sankhadeep
Frequent Visitor

filter dashboard for last input number of days

Hello All,

 

Please provide me the solution for the mentioned scenario :

 

I have created a custom parameter where user can input for LAST ___#___ DAYS(min 1 increment by 1 max 1000)

I have a AllotedDate column which have duplicate days.

 

When the user input for the last # of days, the whole page will filter till max of allotedDate from user input # of days. The dax should respond to any user input and filter the full page.

 

Relative date filter / any other visualization is not neeeded.

 

 

Capture.PNG

 

1 ACCEPTED SOLUTION
v-cherch-msft
Employee
Employee

Hi @Sankhadeep

 

You may add below measures and use Filter measure in visual level filter.Attached the sample file for your reference.

LastNDay =
CALCULATE ( MAX ( Table2[AllotedDate] ), ALL ( Table2 ) ) - Parameter[Parameter Value]
Filter = IF(MAX(Table2[AllotedDate])>=[LastNDay],1)

1.png

Regards,

Cherie

Community Support Team _ Cherie Chen
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-cherch-msft
Employee
Employee

Hi @Sankhadeep

 

You may add below measures and use Filter measure in visual level filter.Attached the sample file for your reference.

LastNDay =
CALCULATE ( MAX ( Table2[AllotedDate] ), ALL ( Table2 ) ) - Parameter[Parameter Value]
Filter = IF(MAX(Table2[AllotedDate])>=[LastNDay],1)

1.png

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-cherch-msft,

 

I tried your soultion it didn't worked for me. Sorry for the late responce as I was out of station. 

It will be very much helpful if u can provide some other solutions/measures regarding this problem.

 

Note : I have some dropdown filters and other data card visuals as well which doesn't take visual level /report level filter for your soltuion.

 

Regards,

Sankhadeep

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.