Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi ,
I need a parameter on days selection . If i select Closure in the next 10 calendar days . It should show me the category where the closure date is in next 10 calendar days .
"X" mentioned below would a parameter with dynamic value . Whatever user input there it should show data accordingly .
Closure in the next X calendar days |
This is my data
Category | Sub Category | Sales | Quantity Q2 | country | Closure date |
Furniture | Chairs | 100 | 10 | China | 22/07/2025 |
Furniture | Tables | 100 | 20 | China | 23/08/2025 |
Automobile | Cars | 100 | 30 | China | 21/7/2025 |
Automobile | Bikes | 700 | 40 | China | 21/6/2025 |
Furniture | Chairs | 100 | 13 | India | 21/8/2025 |
Furniture | Tables | 500 | 22 | India | 21/9/2025 |
Thanks
Hi @nish18_1990 ,
Thanks for the update, please look into the below pbix file.
If this helped, please mark it as the solution so others can benefit too. And if you found it useful, kudos are always appreciated.
Thanks,
Chaithra E.
Create a numeric parameter ranging from 1 to the maximum number of days you want to be able to filter for. Then create a measure like
Closure date within X days =
VAR ChosenDays = [Num Days Value]
VAR RefDate =
SELECTEDVALUE ( 'Table'[Closure Date] )
VAR DaysDiff =
DATEDIFF ( TODAY (), RefDate, DAY )
VAR Result =
IF ( DaysDiff <= ChosenDays, 1 )
RETURN
Result
Add that measure as a filter to your table or matrix visual, set to show only when the value is 1.
Sorry i did tried it but its not working . I am getting 1 value even if i select any number on parameter . I need like if i select 20 on parameter . It should show categories having closure date in next 20 days from today .
Could you please attach the power bi file for reference
User | Count |
---|---|
16 | |
14 | |
13 | |
12 | |
11 |
User | Count |
---|---|
19 | |
15 | |
15 | |
11 | |
10 |