Forum Discussion
Count current Month records based on slicer range
Hi,
I have two tables a Fact and Date Calendar where the relationship between the two tables is
'Fact'[Created Date] = 'Date Calendar'[Date]
I have added a Slicer Visual based on the Date field using the Between style, if a User moves the slider and picks dates between
01/11/2022 to 24/01/2023 I want a Measure where it will COUNT the rows in the Fact table for dates between
01/01/2023 and 24/01/2023
If the Dates was between 15/01/2023 and 24/01/2023 I want it to COUNT between 15/01/2023 and 24/01/2023 not from the 01/01/2023
Thanks
2 Replies
- AnonymousNot applicable
Hello!
A normal measure like COUNTROWS('Fact') would work fine. When the slicer is updated the filter context will change to suit your needs. Anything goes wrong send me a screenshot, i'll check for you 🙂 good luck!
- PowerAuto82
Helper II
Hi Anonymous
I already have a Measure
# Orders =COUNT('Fact'[Order No])+ 0That will change the Count accordingly to what the Date Range is on the slicer but I want a new measure that will Count the Rows on the Latest Month the Date Range is on or if the range is in only showing the current month then just show that date range.Thanks