Forum Discussion
Obtaining date range
- 4 years ago
Hi Syndicate_Admin ,
You can try the following methods. Let me give you an example of creating a new table that includes Date1 and Date2.
Table:
Table = CALENDAR(MIN(Date1[Date1]),MAX(Date2[Date2]))Create another Measure to filter the display date of this table.
Measure = IF ( SELECTEDVALUE ( Date1[Date1] ) <= SELECTEDVALUE ( Date2[Date2] ), IF ( SELECTEDVALUE ( 'Table'[Date] ) >= SELECTEDVALUE ( Date1[Date1] ) && SELECTEDVALUE ( 'Table'[Date] ) <= SELECTEDVALUE ( Date2[Date2] ), 1, 0 ), IF ( SELECTEDVALUE ( 'Table'[Date] ) <= SELECTEDVALUE ( Date1[Date1] ) && SELECTEDVALUE ( 'Table'[Date] ) >= SELECTEDVALUE ( Date2[Date2] ), 1, 0 ) )Put Measure in the filter and set it equal to 1.
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Syndicate_Admin ,
You can try the following methods. Let me give you an example of creating a new table that includes Date1 and Date2.
Table:
Table = CALENDAR(MIN(Date1[Date1]),MAX(Date2[Date2]))
Create another Measure to filter the display date of this table.
Measure =
IF (
SELECTEDVALUE ( Date1[Date1] ) <= SELECTEDVALUE ( Date2[Date2] ),
IF (
SELECTEDVALUE ( 'Table'[Date] ) >= SELECTEDVALUE ( Date1[Date1] )
&& SELECTEDVALUE ( 'Table'[Date] ) <= SELECTEDVALUE ( Date2[Date2] ),
1,
0
),
IF (
SELECTEDVALUE ( 'Table'[Date] ) <= SELECTEDVALUE ( Date1[Date1] )
&& SELECTEDVALUE ( 'Table'[Date] ) >= SELECTEDVALUE ( Date2[Date2] ),
1,
0
)
)
Put Measure in the filter and set it equal to 1.
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Syndicate_Admin4 years agoAdministrator
Good morning, This helped me solve my problem with the date range, the only thing that when trying to show values in that table, it repeats the same value for all days, instead of showing me the corresponding, attached photo. I do not know if it is due to a topic of relationships between the tables or what the problem may be:
Thanks a lot
Greetings.