Forum Discussion
context and calculation
- 4 years ago
Hi ccc123 ,
I create the following relationship.
Then create these measures:
W = CALCULATE ( SUM ( Aw[Sales] ), USERELATIONSHIP ( Aw[Date], Dates[Date] ) )W-1 = CALCULATE ( SUM ( 'Aw-1'[Sales] ), FILTER ( 'Aw-1', 'Aw-1'[Product] = MAX ( Aw[Product] ) && 'Aw-1'[Sub_Product] = MAX ( Aw[Sub_Product] ) ), USERELATIONSHIP ( Dates[Date], 'Aw-1'[Date] ) )Measure = IF ( [W] = BLANK (), [W-1], [W] )If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi ccc123 ,
I create the following relationship.
Then create these measures:
W = CALCULATE ( SUM ( Aw[Sales] ), USERELATIONSHIP ( Aw[Date], Dates[Date] ) )W-1 =
CALCULATE (
SUM ( 'Aw-1'[Sales] ),
FILTER (
'Aw-1',
'Aw-1'[Product] = MAX ( Aw[Product] )
&& 'Aw-1'[Sub_Product] = MAX ( Aw[Sub_Product] )
),
USERELATIONSHIP ( Dates[Date], 'Aw-1'[Date] )
)Measure = IF ( [W] = BLANK (), [W-1], [W] )
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.