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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
manojk_pbi
Helper V
Helper V

Help - Trend chart

Hi Friends,

 

I have below data in model. How can we draw a line chart showing only Dec data of previous years and all months of the current year.

 

MMMYYForecastActualCost
6/1/202331000041813.68764
7/1/202331000075897.3089
8/1/202331000040003.10025
9/1/2023310000117452.1421
10/1/202331000056190.15467
11/1/202331000072202.93116
12/1/2023310000128021.534
1/1/20242970000
2/1/202429700027656.29
3/1/202429700043518.46
4/1/202429700068786.15
5/1/2024297000119160.89
6/1/2024297000139212.38
7/1/2024297000143467.36
8/1/2024297000163607.49
9/1/2024297000188824.68
10/1/2024297000225715.05
11/1/2024297000269808.53
12/1/2024297000296341.22
1/1/20256120000
2/1/202561200026275.19
3/1/202561200085800.02
4/1/2025612000116936.47
5/1/2025612000160379.43
6/1/2025612000187654.78
7/1/2025612000207702.24
8/1/2025612000207702.24
9/1/2025612000207702.24
10/1/2025612000207702.24
11/1/2025612000207702.24
12/1/2025612000207702.24
2 ACCEPTED SOLUTIONS
MasonMA
Super User
Super User

Hello @manojk_pbi 

 

One of the solutions would be to create one Calculated column in the table with below logic,

flag = 
VAR CurrentYear = YEAR(TODAY())
VAR RowYear = YEAR([MMMYY])
VAR RowMonth = MONTH([MMMYY])
RETURN
IF(
    RowYear = CurrentYear,                  
    TRUE(),
    IF(
        RowYear < CurrentYear,              
        RowMonth = 12,                      
        FALSE()                                 )
)

 

and use this flag column as a visual level filter as in below picture.

MasonMA_0-1755094845397.png

Hope this helps:) 

View solution in original post

Thanks for your reply. It is helpful. I am changing the graph to column chart in which we can avoid other months

View solution in original post

2 REPLIES 2
MasonMA
Super User
Super User

Hello @manojk_pbi 

 

One of the solutions would be to create one Calculated column in the table with below logic,

flag = 
VAR CurrentYear = YEAR(TODAY())
VAR RowYear = YEAR([MMMYY])
VAR RowMonth = MONTH([MMMYY])
RETURN
IF(
    RowYear = CurrentYear,                  
    TRUE(),
    IF(
        RowYear < CurrentYear,              
        RowMonth = 12,                      
        FALSE()                                 )
)

 

and use this flag column as a visual level filter as in below picture.

MasonMA_0-1755094845397.png

Hope this helps:) 

Thanks for your reply. It is helpful. I am changing the graph to column chart in which we can avoid other months

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

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.