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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Donia12215
Frequent Visitor

How to get regular line chart instead of stepped

Hi!

 

I want to show cumulative number of improvements by month but instead of regular line chart I have stepped one. I prepared calednar table, marked colum as date table and added colum with month. For cimulative count I created measure that seems to work well. 

Donia12215_1-1684407406364.png

 

When I use Date as X-axis I get stepped chart that I dont want.

Donia12215_0-1684407244143.png

For Month in X-axis I get the line chart I want but I don't like the 1-12 values instead of month names.

Donia12215_2-1684407510617.png

Any idea what did I wrong with the first graph?

 

8 REPLIES 8
Kishore_KVN
Super User
Super User

In the drill down and drill up activity use fourth option which is drill down to the next level in the hierarchy and remove quarter and day from the hierarchy to get only month and year. 

 

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

I think that after marking Date colum as date table I don't have possibility to use drill down and drill up activity. I added additional column in Calendar table and the used it in the graph.

Donia12215_0-1684420985041.png

 

It works but it is strange that I had step line and would be happy to understand what went wrong. 

Hello @Donia12215 can you please share the measure you used for the cummulative calculation. 

Sure!

Donia12215_0-1684421331962.png

 

Hello @Donia12215 , you can not consider just month while calculating the running total because next year it will not work proper so always use complete date. For example use below calculation for running total and try pulling it into the line visual:

Sales rolling average = 
CALCULATE(SUM('Table'[Sales]),
FILTER(ALL('Table'),
'Table'[Dates]<=MAX('Calendar Table'[Date])))

 

Note: you may need to rewrite it as per your data and column headers. 

Good point! Thanks for that!

 

I adjusted however it still doesn't solv the step line issue

Donia12215_0-1684422641256.png

Kishore_KVN
Super User
Super User

Hello @Donia12215 , 

In X-axis select type as categorical instead of continuous then you will get a line instead of a step. 

 

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

It partially does, but now I have all dates. How can I roll that to month?

Donia12215_0-1684409926066.png

 

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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

Top Solution Authors
Top Kudoed Authors