Forum Discussion
PrathSable
Advocate II
6 years agoDivide previous row by next row
Hi Guys, I have the following data set: Date Keyword Count 01-01-2020 ABCD 5 01-01-2020 DEFG 2 01-01-2020 HIGK 3 01-01-2020 LMNO 0 01-01-2020 PQRS 3 01-01-2020 ...
nandukrishnavs
Community Champion
6 years ago
Your example is a bit confusing. 5/3 =67.667?
Try this
Percentage =
var nextDate=MINX(FILTER(ALL('Table'),'Table'[Keyword]=EARLIER('Table'[Keyword])&&'Table'[Date]>EARLIER('Table'[Date])),'Table'[Date])
var nextDateValue= SUMX(FILTER(ALL('Table'),'Table'[Date]=nextDate&&'Table'[Keyword]=EARLIER('Table'[Keyword])),'Table'[Count])
return DIVIDE(nextDateValue,[Count],BLANK())You may have to tweak the logic based on your real scenario.
Did I answer your question? Mark my post as a solution!
Appreciate with a kudos 🙂