Forum Discussion
Anonymous
5 years agoNot applicable
Value from previous row grouping within groups
Dear Community, pelease help New but eager to learn Power BI:-) I am strugling with finding a solution that gives me previous Date/row value and also grouping it by the key/items This it to h...
- 5 years ago
Anonymous ,
You can get
previous Date = coalesce(maxx(filter(Table,[Item] =earlier([Item]) && [Country] =earlier([Country]) && [ChangeDate] <earlier([ChangeDate]) ),[ChangeDate]),[ChangeDate])
Date diff = ( [ChangeDate] ,[previous Date],Day)
For the business days you need to use calendar . refer
https://www.sqlbi.com/articles/counting-working-days-in-dax/
amitchandak
5 years agoSuper User
Anonymous ,
You can get
previous Date = coalesce(maxx(filter(Table,[Item] =earlier([Item]) && [Country] =earlier([Country]) && [ChangeDate] <earlier([ChangeDate]) ),[ChangeDate]),[ChangeDate])
Date diff = ( [ChangeDate] ,[previous Date],Day)
For the business days you need to use calendar . refer
https://www.sqlbi.com/articles/counting-working-days-in-dax/