Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi guys,
I'm fairly new to Power BI and my DAX knowledge is fairly limited, so bear with me.
I have a tabel with the following information:
Month Start, Company, # Safety Briefings for month
1/01/2016, Company A, 5
1/01/2016, Company B, 10
1/01/2016, Company C, 15
1/02/2016, Company A, 6
1/02/2016, Company B, 4
1/02/2016, Company C, 6
etc
What I want to do is calculate the total number of safety briefings completed over the past 3 months.
I have tried creating a new measure using the following:
Safety Briefings last 3 months = CALCULATE(sum(Table1[Safety Briefings]), DATESINPERIOD(Table1[Start Date], LASTDATE(Table1[Start Date]), -3, MONTH))
However, this only gives me the total for the month, NOT the past 3 months.
Any help would be greatly appreciated.
Cheers
Solved! Go to Solution.
Hi @CourtneyLeah, it would be best to have a Date Table and link your Month Start to the date table.
If that is done you could then create the following calculated measure which should work for you.
Safety Briefings last 3 months = CALCULATE ( SUM ( Table1[Safety Briefings] ), DATEADD ( 'Date'[Calendar Date], -3, MONTH ) )
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
93 | |
77 | |
65 | |
53 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |