Forum Discussion
Help request in creating a boolean measure using related table - pbix & dax query template provided
- 5 years ago
ajit_singh
Make a small change to your formula: Replace RemoveFilters() with F2________________________
If my answer was helpful, please consider Accept it as the solution to help the other members find it
Click on the Thumbs-Up icon if you like this reply 🙂
YouTube LinkedIn
CALCULATE ( MAX ( time_date[time_date] ), F2 )
Thank you for the valuable suggestions.
Finally, modified the measure that works at all the time levels (Year, Qtr and Month) :
DEFINE
MEASURE time_date[IsBetweenF2TableMinMaxDates] = VAR FirstDateWithData = CALCULATE ( MIN( time_date[time_date] ), f2 ) VAR LastDateWithData = CALCULATE ( MAX( time_date[time_date] ), f2 ) VAR CurrentRowDate = MIN ( time_date[time_date] ) VAR Result = CurrentRowDate >= FirstDateWithData && CurrentRowDate <= LastDateWithData RETURN Result
EVALUATE
SUMMARIZECOLUMNS(
-- time_date[time_date_id]
--, time_date[time_date]
--time_date[time_cmon_id]
--time_date[time_cqtr_id]
time_date[time_cy_id]
, "IsBetweenF2TableMinMaxDates", time_date[IsBetweenF2TableMinMaxDates]
)
order by
-- time_date[time_date]
--time_date[time_cmon_id]
--time_date[time_cqtr_id]
time_date[time_cy_id]