Forum Discussion
Dynamically Date Range for Selected Values
Hi,
I want to display the data according to the selected values from Date Type, then accordingly the Date slicer filters the data in the table. If a user selects order date, then the date range selection should filter the table for order date.
Thanks,
In visual filter pane, filter Quantity so it doesn't show blank.
Moving forward, it is a good practice to share a sample data (that can be copy pasted to enter data) that best represents your use case rather than a simplified one.
6 Replies
- danextianSuper User
Hi snaseem ,
For this, I'd create a disconnected dates table (no relationship to fact) and a measure that switches between order and shipping date based on a slicer selection. Sample measure
Quantity = SWITCH ( SELECTEDVALUE ( DateType[DateType] ), "Order", CALCULATE ( SUM ( 'Table'[Qty] ), FILTER ( 'Table', 'Table'[Order Date] IN VALUES ( Dates2[Date] ) ) ), "Shipping", CALCULATE ( SUM ( 'Table'[Qty] ), FILTER ( 'Table', 'Table'[Shipping Date] IN VALUES ( Dates2[Date] ) ) ) )Please see attached sample pbix
- danextianSuper User
Hi. What do you mean by there's no data? This screenshot shows that there is
- Ashish_MathurSuper User
Hi,
Share the download linnk of the PBI file.