Forum Discussion
Need help to Display future date columns from slected date range
- 6 years ago
Hi Anonymous ,
Try this measure:
Measure 3 = VAR max_date = CALCULATE ( MAX ( 'Table 2'[selected date] ), ALLSELECTED ( 'Table 2'[selected date] ) ) VAR next_date = CALCULATE ( FIRSTNONBLANK ( 'Table (2)'[selected date], 1 ), FILTER ( 'Table (2)', 'Table (2)'[selected date] > max_date ) ) RETURN IF ( MAX ( 'Table (2)'[selected date] ) IN VALUES ( 'Table 2'[selected date] ) || MAX ( 'Table (2)'[selected date] ) = next_date, 1, 0 )Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi V-lianl-msft ,
Thank you so much for your response, as you suggested i have tried by creating new measure and gone through the sample pbix file, in sample file all fields coming from one table..
but my data model like Date column is coming from Calender table "Date" which is used in date slicer.
selected date, upcloming date columns are coming from other table . so here relation is "selected date" mapped to "date" in Date table.
finally in date slicer i am taking "date" from date table.
for table view i am taking selected date, upcoming dates and created new measure as you suggested and added into filter section with value 1 but in result iam getting all the selected dates without considering max date from date slicer. unable get expected output.
could you please suggest me modified measure logic as per my data model
Thank you,
Mahi18
Hi Anonymous ,
You need to create an unrelated calendar table as a slicer, as in the sample file.
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.