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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
shabirAhmad
Helper II
Helper II

Adding number days as parameters These numbers will not show past only future days from today

Hi Experts,

I am new in Power BI, I  have developed a report on the report i want to add an field of numbers this number field should filter the on the reference to exist Date field as this number of days will not show past . As the user enter a number let say 20 it will show 20 days later data not "Past". It will show only future data from this number of day field and current (i.e Today) date.Please help!

 

 

Best Regards,

Shabir Ahmad

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @shabirAhmad,

You can create a what if parameter table with number values, then you can use it as source of slicer. After these steps, you can create a measure formula to extract the selection to calculate with current row context data.

Use parameters to visualize variables - Power BI | Microsoft Learn

formula =
VAR selection =
    MAX ( WhatIF[Value] )
VAR currDate =
    MAX ( Table[Date] )
RETURN
    DATE ( YEAR ( currDate ), MONTH ( currDate ), DAY ( currDate ) + selection )

Regards,

Xiaoxin Sheng

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @shabirAhmad,

You can create a what if parameter table with number values, then you can use it as source of slicer. After these steps, you can create a measure formula to extract the selection to calculate with current row context data.

Use parameters to visualize variables - Power BI | Microsoft Learn

formula =
VAR selection =
    MAX ( WhatIF[Value] )
VAR currDate =
    MAX ( Table[Date] )
RETURN
    DATE ( YEAR ( currDate ), MONTH ( currDate ), DAY ( currDate ) + selection )

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.