Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Greeting all ,
Well im trying to create 2 measures , one that will display the number of babies born by month year and the other measure that calculate the number of babies born by month year - 1
here as exemple of what im trying to do :
So if we take the first column , the first measure will display the number of babies in september 2020 and the other measure will display the number of babies in september 2019 .
assume that im using 2 tables , Babies_Details , and normal Date table where i created a calculated column called Month Year .
i was able to create the first Measure , it's simple just count row and filter them by Month year . my issue here a trick that can help me create the second measure the N-1 .
Thanks all in advance ^^
Solved! Go to Solution.
Hi @Anonymous !
You cna create a second measure using below DAX;
LastYearBabyCount = CALCULATE([BabyCount], DATEADD('Calendar'[Date], -1, YEAR))
You can replace BabyCount wih your first measure name, this will calculate the no. of babies in previous year.
Regards,
Hasham
Hi @Anonymous !
You cna create a second measure using below DAX;
LastYearBabyCount = CALCULATE([BabyCount], DATEADD('Calendar'[Date], -1, YEAR))
You can replace BabyCount wih your first measure name, this will calculate the no. of babies in previous year.
Regards,
Hasham
Thanks , it works .
i tho about it , but i was afraid that maybe it wont work with the filter of date month . Thanks again for ur answer , u saved me 🙂 ^^
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 38 | |
| 36 | |
| 29 | |
| 28 |
| User | Count |
|---|---|
| 127 | |
| 88 | |
| 78 | |
| 66 | |
| 65 |