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
Good day,
Very new to Power BI.
I have managed to build two measure with rolling totals for current year and last year.
The problem is to display the current year vs last year in the same line chart. The line chart displays cumulative (rolling totals) when '2021&2022'[TXDATE] is used on x-axis. I cannot get month to be cumulative and display 2021 vs 2022 by month in line graph.
Please assist
Hi @johannn ,
Sorry for that I could not access your reports. By the way, for security, please do not directly share your report links on the community.
You may provide some dummy data and the expected outputs instead to help us clarify your scenario.
Refer to:
How to provide sample data in the Power BI Forum - Microsoft Power BI Community
How to Get Your Question Answered Quickly - Microsoft Power BI Community
Based on your description, I have managed to build two measure with rolling totals for current year and last year.
You may use SWITCH() like:
Measure = SWITCH(MAX('Table'[Year]),2022,[Current],2021,[Previous])
Best Regards,
Eyelyn Qin
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!
| User | Count |
|---|---|
| 41 | |
| 38 | |
| 36 | |
| 30 | |
| 28 |
| User | Count |
|---|---|
| 128 | |
| 88 | |
| 79 | |
| 67 | |
| 62 |