Forum Discussion
Two Date Columns in a slicer using DAX
- Anonymous3 years ago
Hi LME ,
Please try:Measure = VAR _min_date = MIN('Dates'[Date]) VAR _max_date = MAX('Dates'[Date]) VAR _result = CALCULATE( COUNTROWS('Table'), ('Table'[Date1]>=_min_date && 'Table'[Date1]<=_max_date) || ('Table'[Date2]>=_min_date && 'Table'[Date2]<=_max_date) ) + 0 RETURN _resultBest Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi LME ,
Please try:
Measure =
VAR _min_date = MIN('Dates'[Date])
VAR _max_date = MAX('Dates'[Date])
VAR _result =
CALCULATE(
COUNTROWS('Table'),
('Table'[Date1]>=_min_date && 'Table'[Date1]<=_max_date)
|| ('Table'[Date2]>=_min_date && 'Table'[Date2]<=_max_date)
) + 0
RETURN
_result
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum