Forum Discussion
Slicer With single selection
Hi,
I have a data like below,
where "Months Since Started" is months difference with current date => (TodayMonth - startDateMonth)
Now i want to have slicer on report which filters
1. Contract expirying with in 6 months => Shows Devices = A, C, D, E
2. Contract expirying with in 3 months => Shows Devices = A, D
3. Contract expirying with in 1 month => Shows Devices = E
Note: Slicer will be single selection
| Device | Contract Start Date | Months Since Started |
| A | 17-Dec-19 | 3 |
| B | 21-Sep-18 | 18 |
| C | 15-Oct-19 | 5 |
| D | 14-Jan-20 | 2 |
| E | 16-Sep-19 | 6 |
11 Replies
- amitchandakSuper User
You can get this by rolling months
Rolling 6 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date Filer],MAX(Sales[Sales Date]),-6,MONTH)) Or Rolling 6 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date Filer],Today(),-6,MONTH)) //3 Rolling 3 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date Filer],MAX(Sales[Sales Date]),-3,MONTH)) Or Rolling 3 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date Filer],Today(),-3,MONTH)) //1 Rolling 1 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date Filer],MAX(Sales[Sales Date]),-1,MONTH)) Or Rolling 1 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date Filer],Today(),-1,MONTH))You can use a slicer like this to handle these measures
- ravitejaballaHelper III
amitchandaksorry It won't help. I already have computated data in "Months since started". I only need to have a slicer as described.
- amitchandakSuper User
- daxCommunity Support
Hi ravitejaballa ,
I don't know your slicer style, you could refer to my sample for details. If this is not waht you want, please correct me and inform me more detailed information(such as your expected output and your sample data)? Then I will help you more correctly.
Please do mask sensitive data before uploading.
Thanks for your understanding and support.
Best Regards,
Zoe ZhiIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Ashish_MathurSuper User
- ravitejaballaHelper III
Here is my sample data.
Device Contract Start Date Months Since Started A 17-Dec-19 3 B 21-Sep-18 18 C 15-Oct-19 5 D 14-Jan-20 2 E 16-Sep-19 6 Index Contract expirying 1 with in 6 months 2 with in 3 months 3 with in 1 month So Slicer should filter table as below.
1. Contract expirying "with in 6 months" => Shows Devices = A, C, D, E
2. Contract expirying "with in 3 months" => Shows Devices = A, D
3. Contract expirying "with in 1 month" => Shows Devices = C, E
- Ashish_MathurSuper User
Hi,
That is exactly what my solution does. I have shared the file with you.