0
votes

Here I have Table A it contains id, date, sector, zone. I created a calculated Measure Customer Relation. If the customer has at least one transaction within the last 6 months then considers as an active customer else inactive customer. This is my formula:

customer Relation = IF(DateDiff(Table A[Date], TODAY(), MONTH) > 6, "Inactive", "Active")

Here my question is, take the input minimum date from the date slicer. That means in my dashboard I took date field as slicer visualizer. For the above formal instated of TODAY() function, use that selected date from date slicer (in between) visualization.

For Example in data visualization:

If I select a date from 1-2-2007 to 2-12-2007

DateDiff(Table A[Date],1-2-2007,MONTH)>6,"Inactive","Active")

, if I selected a date from 1-2-2008 to 2-12-2009

DateDiff(Table A[Date],1-2-2008,MONTH)>6,"Inactive","Active")

..etc like that the my report should be change for direct query

1

1 Answers

0
votes

You can try using a variable:

customer Relation = 
VAR Max_Date = Max(date_slicer_date)
VAR CustRel = IF(DateDiff(Table A[Date], Max_date, MONTH) > 6, "Inactive", "Active")
Return CustRel

This should give you the desired result. Hope this helps.