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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. 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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

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.

March Power BI Update Carousel

Power BI Community Update - March 2026

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