Hi @Melissa & @ankit -
Thanks alot for the help. It is working perfectly in my case.
@ankit - Actually i had created sample data and provided the file. In my actual file i have included the date table and and liberty to the user to select the dates
Thank you guys once again.
Now going one step ahead, actually my abuser count calculation is not dynamic i.e. it is just counting rows based on the counts of abuser description. Similar to the lines of code what melissa had specified i did create a new measure for abuser count which is as below. This measure based on the date selection updates the abuser count suppose i did select December month it would count the abuser from December and gives that value and accordingly updated abuse timeline manager as well.
Abuse timeline =
VAR myID = SELECTEDVALUE(Sheet1[id])
VAR myDescr = SELECTEDVALUE(Sheet1[Abuser Descr])
var mydate = SELECTEDVALUE(Sheet1[Date])
VAR myTable =
FILTER( ALL( Sheet1 ) ,
Sheet1[id] = myID &&
Sheet1[Abuser Descr] = myDescr && Sheet1[Date] <= mydate
)
VAR myTable1 =
FILTER( ALL( Sheet1 ) ,
Sheet1[id] = myID &&
Sheet1[Abuser Descr] = myDescr
)
RETURN
IF(NOT(HASONEFILTER(Sheet1[Date])),IF( HASONEVALUE( Sheet1[id] ),
CALCULATE(
CONCATENATEX(
SELECTCOLUMNS( myTable1 ,
“Format Date” ,
[Format Date]
),
[Format Date] ,
", "
)
),
BLANK()
),
IF( HASONEVALUE( Sheet1[id] ),
CALCULATE(
CONCATENATEX(
SELECTCOLUMNS( myTable ,
“Format Date” ,
[Format Date]
),
[Format Date] ,
", "
)
),
BLANK()
))
Abuser Count =
Var Mydate = SELECTEDVALUE(Sheet1[Date])
var Myphone = SELECTEDVALUE(Sheet1[Phone Number])
var MyAbuser = SELECTEDVALUE(Sheet1[Abuser Descr])
Var mytable = FILTER(ALL(Sheet1),Sheet1[Date] <= Mydate && Sheet1[Phone Number] = Myphone && Sheet1[Abuser Descr] = MyAbuser)
return
IF(NOT(HASONEFILTER(Sheet1[Date])),
CALCULATE(COUNT(Sheet1[Abuser Descr]),ALLEXCEPT(Sheet1,Sheet1[Phone Number])
),CALCULATE(COUNTX(mytable,MyAbuser)))
@Melissa & @ankit - Kindly let me know if there is any short cut to handle this within your code. However the additions done by me are giving correct results.
Atttaching the pbix as well.
eDNA Forum - Previous Value identification - vishy.pbix (55.7 KB)