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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
MikeSlaught
Regular Visitor

Having trouble viewing data by month in line chart visualization

Hello there! I am trying to do something that I thought would be very simple.

Here I have my table:

 

Table.png

 

I want to have a line chart that displays a count of transactions not only by year, but also by month. However, it ONLY gives me the option to view by year.

 

Visualization.png

I'm going crazy trying to figure this out.... some insight would be greatly appreciated!

 

Thanks for your help,

    Mike

 

1 ACCEPTED SOLUTION

The problem lied with heirarchy functionality being currently disabled for Line Charts:

http://community.powerbi.com/t5/Desktop/Date-Hierachy/m-p/13665#M3481

 

Thanks for your help!

View solution in original post

6 REPLIES 6
wonga
Continued Contributor
Continued Contributor

@MikeSlaught

 

It looks like you date hierarchy is missing levels like day and month. See if there's anything you can do in the "Edit Queries" windows to manipulate the dates such that that you can get that desired hierarchy.

Anonymous
Not applicable

This kind of thing is best handled by a date table. You would create a relationship between the date table's date column and the Trans Date*, then use columns from the date table as the axis hierarchy.

 

A date table is used for time intelligence functions and should contain a date column with a continuous range of dates that cover the entire period that your data model will use, with no skipped dates. Usually they also contain other columns with supplemental breakdowns of those dates (week, month, quarter, etc). There are some out of the box that you can use I think from azure services or you can find custom queries for creating your own. I have posted an example query before, but I don't remember in which thread.

 

*for Post Date you would then have to create a second relationship to that date table date column. This will be an inactive relationship, so you'll need to create a measure specifically for amount by post date.

Amount By Post Date =CALCULATE(SUM(Table[Amount]), USERELATIONSHIP(Table[Post Date], DateTable[Date]))

Sean
Community Champion
Community Champion

@MikeSlaught You can read more about what @Anonymous is suggesting go here...

http://exceleratorbi.com.au/multiple-relationships-between-tables-in-dax/

Thanks, I was hoping I would not have to set something like this up, but it seems it is the only way....

 

Much appreciated, I'll mark as solution once I get it to work

Anonymous
Not applicable

I found that example date table query. It's just an example but it might work for you. The first statement (#"Created Date List") is where you set the range of dates. Enter the first date and the number of days forward from that date there.

The problem lied with heirarchy functionality being currently disabled for Line Charts:

http://community.powerbi.com/t5/Desktop/Date-Hierachy/m-p/13665#M3481

 

Thanks for your help!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 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.