Forum Discussion
Comparing Values with Offset?
- Anonymous3 years ago
Hi TotunG ,
Here are the steps you can follow:
1. You reposition the two columns of the Period Ref table, with [Period Ref] first and [Period Name] last.
2. Create calculated column.
Table 2 = var _table1= SUMMARIZE( 'Table','Table'[Period Ref], "Period Name", "P_Total") return UNION( 'Table',_table1)3. Combine the relationship between two tables.
4. Create measure.
Flag= IF( MAX('Table 2'[Period Ref]) in SELECTCOLUMNS('MainData',"1",[Period]) && MAX('Table 2'[Period Name]) <> "P_Total", [Total Value],[Dynamic DIfference])5. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi TotunG ,
Here are the steps you can follow:
1. You reposition the two columns of the Period Ref table, with [Period Ref] first and [Period Name] last.
2. Create calculated column.
Table 2 =
var _table1=
SUMMARIZE(
'Table','Table'[Period Ref],
"Period Name",
"P_Total")
return
UNION(
'Table',_table1)
3. Combine the relationship between two tables.
4. Create measure.
Flag=
IF(
MAX('Table 2'[Period Ref]) in SELECTCOLUMNS('MainData',"1",[Period]) && MAX('Table 2'[Period Name]) <> "P_Total",
[Total Value],[Dynamic DIfference])
5. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Seems like it might work - will try this out. Do you mind briefly breaking down the steps in this and why you did them? No worries if not as appreciate your help regardless.