Forum Discussion
comp date measure
- Anonymous6 years ago
Hi jherbert1017
I build two table like yours to have a test.
Transaction table:
You don’t need to merge Transaction table and Calendar Table. And if you feel your report is slow and performance is not good, you may need to optimize performance. For more info about optimize performance:Optimization guide for Power BI
You may achieve your goal by measure.
Firstly we use Visit Date in Calendar Table to build a Slicer.
Then we build a measure as below:
TotalIncome = CALCULATE(SUM('Transaction'[Income]),FILTER(ALL('Transaction'),'Transaction'[Visit Date]=MAX('Calendar'[Visit Date])))Add this measure in a card visual or Transaction table visual to show the result.
Result:
Select 2019/7/4 in slicer
You can download the pbix file from this link: Comp date measure
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi jherbert1017
Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your problem or share me with your pbix file from your onedrive business.
Best Regards,
Rico Zhou