Forum Discussion
Anonymous
6 years agoNot applicable
Week over Week change for the same document
Hello guys! I have a table called "OPEN POs" that looks like this: WeekNum Supplier PO number Payment term 33 A 158 30 days 33 C 105 60 days 33 Y 469 30 days 33 A ...
- 6 years ago
What should happen in week number 1 ?
Anyway. Add two calculated columns (measures are not required here as there is no filter impact)
Last Week = var p='OPEN POs'[PO number] var s='OPEN POs'[Supplier] var w='OPEN POs'[WeekNum] return calculate(max('OPEN POs'[Payment term]),all('OPEN POs'),'OPEN POs'[PO number]=p,'OPEN POs'[Supplier]=s,'OPEN POs'[WeekNum]=w-1) Different = SWITCH(TRUE(),ISBLANK('OPEN POs'[Last Week]),"no",[Last Week]='OPEN POs'[Payment term],"no","yes")Then filter your table to Different="yes"
lbendlin
6 years agoSuper User
What should happen in week number 1 ?
Anyway. Add two calculated columns (measures are not required here as there is no filter impact)
Last Week =
var p='OPEN POs'[PO number]
var s='OPEN POs'[Supplier]
var w='OPEN POs'[WeekNum]
return calculate(max('OPEN POs'[Payment term]),all('OPEN POs'),'OPEN POs'[PO number]=p,'OPEN POs'[Supplier]=s,'OPEN POs'[WeekNum]=w-1)
Different = SWITCH(TRUE(),ISBLANK('OPEN POs'[Last Week]),"no",[Last Week]='OPEN POs'[Payment term],"no","yes")
Then filter your table to Different="yes"
Anonymous
6 years agoNot applicable
Let me try this solution..
btw, week number one can be null.. no reference to bring any variance.
- lbendlin6 years agoSuper User
that's not what I meant. Is your report limited to a single year? Or would you expect week 1 look back at week 52 of the prior year etc?
- Anonymous6 years agoNot applicable
good catch.. at some point i'll have the same week for a subsequent year