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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
asjones
Helper IV
Helper IV

Line Chart Expense by Month with Lines for Each Year Top of Each Other

I have expenes by month for many yhears back. I am trying to build a line chart showing expense by month with a seperate line for each fiscal year. The lines for each year would be on top of each other so one can compare differences, trends of up and down etc. I ran into some issues so i looked online and watched a few videos and sitll amd not gettinga corrrect chart type. The closes chart I am getting is the expense by year as seen below after i drill down one level.

The first screenshot belows shows after "drill down" but the years still are on the X axis not the months.
The second screenshot is before I "drill down"
I incluced in the screenshot the Axis information, any idea what i am doing wrong?

 

thanks

Alan

 

asjones_0-1731527000479.png

 

asjones_1-1731527173990.png

 

5 REPLIES 5
asjones
Helper IV
Helper IV

@vicky_  & @v-xiaocliu-msft 

Thanks for your help adding the month specfic column fixed the issue. I also added a month number and I sorted in the table and tried soring with the Sorby By Column option and neither worked for sorting. It still sorted by month name. Not sure what i am missing. I did some searches and they all suggested what I tried.

thanks

Alan

asjones_0-1731717523594.png

 

asjones
Helper IV
Helper IV

@vicky_,I think that may be the issue... I realized in some other cases a date field makes its own hierarchy but this done does not.

 

@v-xiaocliu-msftthanks for the sample. In some cases, the date fields makes its own hierarchy and this case it is not.
thanks to both of you for your ideas. I will test later today.

 

Alan

 

v-xiaocliu-msft
Community Support
Community Support

Hi @asjones ,

 

I made a sampl for you.

vxiaocliumsft_0-1731563579274.png

vxiaocliumsft_1-1731563589895.png

vxiaocliumsft_2-1731563631124.png

 

Best  Regards,

Wearsky

Ashish_Mathur
Super User
Super User

Hi,

Share the download link of the PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
vicky_
Super User
Super User

Does "Date To" already contain the month that you're trying to compare (in the format dd/mm or just mmm without the year part?)
If so, then you can either remove the year from your date heirarchy or change the way that you drill down. I.e use the green drill down button and keep the year ONLY in the legend (and upper level of the heirarchy)

vicky__0-1731530788528.png

Otherwise, you'll need to create a column on your date table / column that has JUST the month so that the lines will overlap. Something like:

Month = FORMAT(Table[Date To], "mmm")

and to get it to sort correctly, create another column that has the month as a number:

Month Number = INT(FORMAT(Table[Date To], "mm"))

and then sort the former by the latter.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.