Forum Discussion
Convert Measure to Column
- 1 year ago
Same = COUNTROWS(INTERSECT('TODAY',YESTERDAY)) Removed = countrows(except(YESTERDAY,'TODAY')) Added = COUNTROWS(EXCEPT('TODAY',YESTERDAY))
Hi en_90 ,
You can try indexing logic with custom column -
SO_CAT =
VAR __TodaySO =
COUNTROWS(
FILTER(
'TableTop2',
[RUN_DATE] = TODAY()
)
)
VAR __TotalSO =
COUNTROWS(
SUMMARIZE(
'TableTop2',
'TableTop2'[RUN_DATE]
)
)
VAR __IndexSO =
RANKX(
'TableTop2',
'TableTop2'[RUN_DATE],
, ASC,
DENSE
)
RETURN
SWITCH(TRUE(),
__TodaySO >= 1 && __IndexSO = 1, "NEW",
__TodaySO >= 1 && __IndexSO > 1, "EXI
STING",
"REMOVED"
I hope it will be helpful.
Thanks,
Sai Teja
)
Thank you, Sai Teja. I tried your code but it did not produce the expected results.
Here's a link to sample data.
Yesterday's data run had 2885 records. Today's run had 2969. The expected results are as follows:
- 2816 existing records (2816 carried over from yesterday to today)
- 153 added records (153 records present in today's data but not in yesterday's data)
- 69 removed records (69 records present in yesterday's data but not in today's data)