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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
qazwsxedc
Helper III
Helper III

How to overlay the line charts?

I have a graph like below. However, I would like to overlay the lines in terms of month, i.e. the axis only shows Jan, Feb ....Dec. I have created three measures, CPR_2018,CPR_2019 and CPR_2020. They just look like below:

 

qazwsxedc_1-1611256407128.png

If I put the "Month Name Short" on Axis, nothing will come out. Can anybody help me? Thanks a lot!

 

qazwsxedc_2-1611256477060.png

 

 

5 REPLIES 5
v-yangliu-msft
Community Support
Community Support

Hi  @qazwsxedc ,

You can select the date column on the axis axis and use the month in the hierarchy

v-yangliu-msft_0-1611538850194.jpeg

 

Best Regards

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

pranit828
Community Champion
Community Champion

HI @qazwsxedc ,

Create a new column on the date field as below and use it in the axis.

_Month = FORMAT('table'[date],"mmm")




PBI_SuperUser_Rank@1x.png


Hope it resolves your issue? 
Did I answer your question? Mark my post as a solution!

Appreciate your Kudos, Press the thumbs up button!!
Linkedin Profile

I created the new column and used it in axis but still not working. Nothing coming out.

 

qazwsxedc_5-1611261688793.png

 

qazwsxedc
Helper III
Helper III

The dataset contains confidential information, so I can not shared. But I can share the measures, perhaps they can help to identify why 'Month Name Short' does not work. Thanks!

 

1. PaidOut =

CALCULATE(sum('Mortgage Summary'[Change of Balance]),'Mortgage Summary'[Comment] in {"Early PaidOut","PaidOut at Renewal"})
 
2.
PaidOut% =
IF(
    ISFILTERED('BusinessDate'[Date]),
        VAR __PREV_MONTH =
        CALCULATE(
            SUM('Historical Balances'[Balance]),
            DATEADD('BusinessDate'[Date].[Date], -1, MONTH)
        )
    RETURN
        DIVIDE(-[PaidOut], __PREV_MONTH)
)
 
3.
CPR_PaidOut% =
IF(NOT ISBLANK([PaidOut%]),
    1-power(1-[PaidOut%],12))
 
4. 
CPR_2018 =
CALCULATE([CPR_PaidOut%],BusinessDate[Year]=2018)
 
5. 
CPR_2019 =
CALCULATE([CPR_PaidOut%],BusinessDate[Year]=2019)
 
6. 
CPR_2020 =
CALCULATE([CPR_PaidOut%],BusinessDate[Year]=2020)
Anonymous
Not applicable

Can you provide us with a sample of the dataset you're working with, please?

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.