Forum Discussion
marienugent
3 years agoRegular Visitor
Date Sliders OR Logic
Hello. I am new to Power BI. I am needing to add a date slider to my report, however, I need the slider to look at two different columns and use an OR logic. For example, if we had a purchased da...
- Anonymous3 years ago
Hi marienugent ,
You can try this code to get count result.
Count = VAR _Date_Range = VALUES ( 'Calendar'[Date] ) RETURN CALCULATE(COUNT('Table'[ID]),FILTER('Table', OR ( 'Table'[Purchase Date] IN _Date_Range, 'Table'[Returned Date] IN _Date_Range )))Result is as below.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
marienugent
3 years agoRegular Visitor
This works, but only if I am displaying the dates in the visual, which I do not want them displayed. The only thing I need in the visual is a count of revenue and transactions, but I need the slicer to be able to accurately change those counts based on the purchase and returned dates.
Anonymous
3 years agoNot applicable
Hi marienugent ,
You can try this code to get count result.
Count =
VAR _Date_Range =
VALUES ( 'Calendar'[Date] )
RETURN
CALCULATE(COUNT('Table'[ID]),FILTER('Table', OR ( 'Table'[Purchase Date] IN _Date_Range, 'Table'[Returned Date] IN _Date_Range )))
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.