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 ,
It's not clear what your table structure is, you can try placing the formula in a PBIX file to see if that works.
If the results are not what you expected, Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.
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
- TotunG3 years agoResolver I
Okay sample file is attached with explaination (also a photo if needed). There is a relationship between 2 tables with columns Period and Period Name so that user can use Period Name to filter MainData periods:
https://drive.google.com/file/d/19KDNuA7CRElc-O1H8WwschGNoU29qUBv/view?usp=sharing