Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Does power bi have the ability to build something like an input box where a user can enter a number and filtering is done according to that number.
for example the ability to show sales and quantity sold over a period of time and the user can decide if they want to see it by the past 7 days, 45 days, 180 days. Whichever they would prefer to see.
Solved! Go to Solution.
Hi @tbrown33 ,
I suggest you to use what if parameter to create a slicer.
For reference: Create and use what-if parameters to visualize variables in Power BI Desktop
In my sample I create a 'Past Days' parameter from 1 to 200 and Increment is 1. My data table contains quantities from 2021/01/01 to today. In my example, for ease of calculation, the daily quantity is 1.
Past N days Quantity =
VAR _INPUT_DAYS =
SELECTEDVALUE ( 'Past Days'[Past Days] )
VAR _QUANTITY =
CALCULATE (
SUM ( 'Table'[Quantity] ),
FILTER (
'Table',
'Table'[Date] < TODAY ()
&& 'Table'[Date]
>= TODAY () - _INPUT_DAYS
)
)
RETURN
_QUANTITY
Result is as below.
Past 7 days:
Past 180 days:
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks, someone showed me the relative date option within the slicer. This will be the option my users would enjoy using.
Hi @tbrown33 ,
I suggest you to use what if parameter to create a slicer.
For reference: Create and use what-if parameters to visualize variables in Power BI Desktop
In my sample I create a 'Past Days' parameter from 1 to 200 and Increment is 1. My data table contains quantities from 2021/01/01 to today. In my example, for ease of calculation, the daily quantity is 1.
Past N days Quantity =
VAR _INPUT_DAYS =
SELECTEDVALUE ( 'Past Days'[Past Days] )
VAR _QUANTITY =
CALCULATE (
SUM ( 'Table'[Quantity] ),
FILTER (
'Table',
'Table'[Date] < TODAY ()
&& 'Table'[Date]
>= TODAY () - _INPUT_DAYS
)
)
RETURN
_QUANTITY
Result is as below.
Past 7 days:
Past 180 days:
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
That is standard functionality in the filter pane. All you need to do (in the options) is to allow report users to change filter types.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
4 | |
4 | |
3 | |
3 | |
2 |