Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
CapSiriMBRD
New Member

line chart Dax

Hello team

In line chart I am required to compare the count from current year to previous year
for current year & month I need to get the data from all years from 2019  to 2023 all the months and current year month data I need to show how can I do that

CALCULATE([1_Y],FILTER(Query1,
Query1[Year] >= 2019 && Query1[Year] <= YEAR(TODAY())) && MONTH(TODAY()) >= Query1[MonthID])
)
CapSiriMBRD_0-1704879891646.png

can anyone help me solving this 

1 REPLY 1
Anonymous
Not applicable

Hi @CapSiriMBRD ,

If I understand correctly, the issue is that you want to compare the count from current year to pervious year. In order to make a deep troubleshooting, could you please provide more raw data(exclude sensitive data) with Text format? It would be helpful to find out the solution.

You can refer the following links to share the required info:

How to provide sample data in the Power BI Forum

 

Looking forward to your reply.

Best Regards

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.