Forum Discussion
Measure Net Sales calculated before and after a specific date from other table
- 2 years ago
Hi Anonymous ,
Thank you for the response. Unfortunately those measures are returning blank also.
Luckly I've managed to figure it out by my self. The correct measure was the first one posted by me in the initial request and all I had to do was to add a slicer (Single Select) for the EVENT ID.
Hello kta87 ,
Thank you for your question. You can follow these steps:
- Create a measure
Net Sales Before =
CALCULATE (
SUM ( SALES[Net Sales] ),
FILTER (
ALL ( SALES ),
'SALES'[Customer ID] = SELECTEDVALUE ( 'Table'[Customer ID] )
&& 'SALES'[Calendar Date] < SELECTEDVALUE ( 'Table'[Event Date] )
)
)
- Create another measure
Net Sales After =
CALCULATE (
SUM ( SALES[Net Sales] ),
FILTER (
ALL ( SALES ),
'SALES'[Customer ID] = SELECTEDVALUE ( 'Table'[Customer ID] )
&& 'SALES'[Calendar Date] >= SELECTEDVALUE ( 'Table'[Event Date] )
)
)
How to Get Your Question Answered Quickly - Microsoft Fabric Community
If it does not help, please provide more details with your desired out put and pbix file without privacy information.
Best Regards,
Yifan Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous ,
Thank you for the response. Unfortunately those measures are returning blank also.
Luckly I've managed to figure it out by my self. The correct measure was the first one posted by me in the initial request and all I had to do was to add a slicer (Single Select) for the EVENT ID.