Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I have configured the 'from date' and the 'to date' parameters in Paginated report. The report works fine.
I want to introduce a constraint/requirement that the use should not select a 'to date' which is before the 'from date'. Eg., if the from date is 10-Oct-@2023, the user can only select a 'to date' from 11-Oct-2023 onwards, the user should not be able to select 09-Oct-2023 or any previuous dates.
Hi Tech Community,
Has anyone been able to apply such a feature in your report?
I have applied the above method, but unable to get it resolved.
Help would be appreciated.
Hi Tech Community,
I got the solution and it works by throwing and error message when the From Date is after To Date. Solution is that : the From Date and To date has to be selected in the Filters in Dataset Properties as shown below.
This issue is still open, has anyone resolved a similar issue ?
@Anonymous You can try these steps:
=DateAdd(DateInterval.Day, 1, Parameters!FromDate.Value)
If you find this insightful, please provide a Kudo and accept this as a solution.
Hi Devesh_gupta,
Thank you so much for the help but I could not get it to work.
I tried 2 methods :
1. created 2 Parameters as StartDate and EndDate in the Parameters on the top left
2. In StartDate I selected 'no default value' under DefaultValues
3. In End Date I selected 'Speficyvalues' under DefaulValues, selected add and entered the code "=DateAdd(DateInterval.Day, 1, Parameters!StartDate.Value)"
4. Under dataset where I have my dataset as SQL_Data, I have not made any config for date parameters.............. Then I select the 'to date' before the 'from date', the report runs but it brings data from another data from previous year. (Ideally I think the report should not run at all).
Method 2
under dataset-SQL_Data-> under filters->Add->expression-> select the date field
operator-> between. Then under value i selected StartDate. Then in the next box ->fx-> added =DateAdd(DateInterval.Day, 1, Parameters!StartDate.Value)..... The I run the report by selecting 'to date' before the 'from date'. This method does not get any data but report runs succesfully with no data in the report.
Can you please help find what I am doign incorrectly ,
@devesh_gupta some week ago i resolved it.
Steps to resolve:
under dataset-SQL_Data-> under filters->Add->expression-> select the date field
operator-> between. Then under value I selected [@StartDate]. Then in the next box ->fx-> I selected =Parameters!StartDate.Value. Similarly I selected [@EndDate] and in the fx-> I selected =Parameters!EndDate.Value
This works.
@devesh_gupta thank you so much as you made the basic structure.
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
109 | |
100 | |
95 | |
38 | |
37 |
User | Count |
---|---|
151 | |
126 | |
75 | |
74 | |
57 |