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
Hi all,
Here's my sample:
I need to sum up the last 3 month views (green rows) and compare it against the last 6 months views (from August to June - yellow rows).
At the moment, the sum of 3 months views is working properly:
Solved! Go to Solution.
Hi, @flippe
According to your description, you want to calculate “the last 6 months views”. Right?
Here are the steps you can refer to:
(1)This is my test data:
(2)I create a date table like yours and create relationships between two tables:
(3)Then we can create a measure :
Previous 6M views = var _current_date =EOMONTH( MAX('Calendar'[Date]) , 0)
var _previous_months = EOMONTH(_current_date,-6)+1
var _t= FILTER( ALLSELECTED('Table') , 'Table'[Date] >= _previous_months && 'Table'[Date] <= _current_date)
return
SUMX(_t ,[Value])
(4)Then we can put this on the visual and we will meet your need:
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi, @flippe
According to your description, you want to calculate “the last 6 months views”. Right?
Here are the steps you can refer to:
(1)This is my test data:
(2)I create a date table like yours and create relationships between two tables:
(3)Then we can create a measure :
Previous 6M views = var _current_date =EOMONTH( MAX('Calendar'[Date]) , 0)
var _previous_months = EOMONTH(_current_date,-6)+1
var _t= FILTER( ALLSELECTED('Table') , 'Table'[Date] >= _previous_months && 'Table'[Date] <= _current_date)
return
SUMX(_t ,[Value])
(4)Then we can put this on the visual and we will meet your need:
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 20 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 33 | |
| 31 | |
| 19 | |
| 12 | |
| 11 |