Forum Discussion
Create a column with condition based on different columns
- 4 years ago
amitchandak thank you for the code.
if in the above scenario, if I want to find the delta of sales with reference today(the one which I filter) and yesterday (with reference to filtered)- what could you suggest to write in dax.
thank you in advance. - 4 years ago
Hi surajbh ,
The reference could be like this:
Reference = VAR _last = MAXX ( FILTER ( 'Table', [Date] = EARLIER ( 'Table'[Date] ) - 1 && [Primary key] = EARLIER ( 'Table'[Primary key] ) ), [Sales] ) return [Sales] - _lastBest Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak thank you for the code.
if in the above scenario, if I want to find the delta of sales with reference today(the one which I filter) and yesterday (with reference to filtered)- what could you suggest to write in dax.
thank you in advance.
Hi surajbh ,
The reference could be like this:
Reference =
VAR _last =
MAXX (
FILTER (
'Table',
[Date]
= EARLIER ( 'Table'[Date] ) - 1
&& [Primary key] = EARLIER ( 'Table'[Primary key] )
),
[Sales]
)
return
[Sales] - _last
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.