Forum Discussion
en_90
1 year agoFrequent Visitor
New/Removed Rows Day-Over-Day
Hello, I would like to identify and count the changes in sales orders day-over-day i.e. identify/count the number of sales orders that were added and removed day-over-day so ideally, when the da...
Anonymous
1 year agoNot applicable
Hi ALL,
Firstly GilbertQ thank you for your solution!
And en_90 ,According to your needs, we use countrows to determine whether the previous date exists in the latest date, if it exists NO Change If it does not exist, then it is New , I hope that my thinking for you!
NO or Change =
VAR PreviousDate2 =
CALCULATE(MAX('Table'[RUN_DATE]),
FILTER(ALL('Table'), 'Table'[RUN_DATE] < MAX('Table'[RUN_DATE]))
)
RETURN
IF(
CALCULATE(
COUNTROWS('Table'),
'Table'[SALES_ORDER]=MAX('Table'[SALES_ORDER]),
'Table'[RUN_DATE]=PreviousDate2)>0,
"NO CHANGE",
"NEW")Remove =
VAR CurrentDate =CALCULATE(MAX( 'Table'[RUN_DATE]),ALL('Table'))
RETURN
IF(CALCULATE(
COUNTROWS('Table'),
'Table'[SALES_ORDER]=MAX('Table'[SALES_ORDER]),
'Table'[RUN_DATE]=CurrentDate)>0,BLANK(),
"REMOVE")
Hope it helps!
Best regards,
Community Support Team_ Tom Shen
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
- en_901 year agoFrequent Visitor
Anonymous thanks for the quick response. I have succesfully implemented your code but I need to be able to count the number of sales ordres that are new, no change and removed by RUN_DATE. WIth this code, I am unable to accomplish this. Any suggestions? Thank you.