The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi everyone
I have fact table with some sales. The table records the sales per day. I also have a dimesion kalender table and a relationship between the two tables. The calendertable has dates into the future. I would like a dax formula the can show me the sales today 6 months ago. Can anyone help with that?
Sincerely
Christian
Hi,
I am not sure how your datamodel looks like but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
I hope the below can provide some ideas on how to create a solution for your datamodel.
Sales total: =
SUM( Sales[Sales] )
Sales 6 months ago: =
CALCULATE ( SUM ( Sales[Sales] ), DATEADD ( 'Calendar'[Date], -6, MONTH ) )
User | Count |
---|---|
11 | |
9 | |
6 | |
6 | |
5 |
User | Count |
---|---|
24 | |
14 | |
14 | |
9 | |
7 |