Forum Discussion
adding new rows in table with condition
- 4 years ago
Hi sam_hoccane ,
According to your description, I create a sample.
Here's my solution.
1.Create a new table. Make relationship with the two tables, the Year Month column in the two tables both should be of date type.
2.Create a measure.
Measure Value = IF ( MAX ( 'Table'[Value] ) <> BLANK (), MAX ( 'Table'[Value] ), MAXX ( FILTER ( ALL ( 'Table' ), 'Table'[Year Month ] = MAXX ( ALL ( 'Table' ), 'Table'[Year Month ] ) ), 'Table'[Value] ) * POWER ( 1.2, DATEDIFF ( MAXX ( ALL ( 'Table' ), 'Table'[Year Month ] ), MAX ( 'Table (2)'[Year Month] ), MONTH ) ) )Get the result.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyjIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi sam_hoccane ,
According to your description, I create a sample.
Here's my solution.
1.Create a new table. Make relationship with the two tables, the Year Month column in the two tables both should be of date type.
2.Create a measure.
Measure Value =
IF (
MAX ( 'Table'[Value] ) <> BLANK (),
MAX ( 'Table'[Value] ),
MAXX (
FILTER (
ALL ( 'Table' ),
'Table'[Year Month ] = MAXX ( ALL ( 'Table' ), 'Table'[Year Month ] )
),
'Table'[Value]
)
* POWER (
1.2,
DATEDIFF (
MAXX ( ALL ( 'Table' ), 'Table'[Year Month ] ),
MAX ( 'Table (2)'[Year Month] ),
MONTH
)
)
)
Get the result.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.