cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

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

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors