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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
MikeSwe
Regular Visitor

Help with line and stacked column chart for running totals

I am struggling to create the graph that I want and hope that someone can help me.

 

The goal is to create a Lined and Stacked column chart containing bars with a summary of issues created per year and in the same chart a line that shows the number of unresolved/open issues per year as a running total.

 

The table is called "JiraData" and I have a few key columns in the table that I am trying to use for the graph.

- "Created" Contains the date when the issue was created.

- "Resolved" Contains the date of when the issue was resolved, if not yet resolved this column is blank.

- "Issue Key" Contains a unique value per issue.

 

When using "Year" from the date hierarchy for the X-axis and "Count of Issue Key" for the Y-axis it correctly show the bars with a summary of issues created per year. 

 

I have also created a new column called "Unresolved" which is set to "1" for unresolved issues and "0" for resolved.

 

What should I type in the measure to calculate the number of open issues per year as a running total and use that for my Line Y-axis?

 

If needed I can create a separate Date table, create new columns or make any modification necessary to best accomplish the above.

 

Thanks!

1 ACCEPTED SOLUTION
Daniel29195
Super User
Super User

@MikeSwe 

assuming, your chart have date column in it : 

to create a running total. use this  

measure = 

var maxdate  = max(date_table[date_column])
var res = 

calculate (
sum(table_name[col_name]),
all(date_table) , 
date_table[date_column] < = maxdate ) 

return res

 

 

option2 :  

this will take into consideration the period selected, and will start your running total base on your selection : 

measure = 

var maxdate  = calculate( max(date_table[date_column]))

var mindate = calculate( min (date_table[date_column] ,  allselected( date_table[date_column]) ) 
var res = 

calculate (
sum(table_name[col_name]),
all(date_table) , 
date_table[date_column] < = maxdate ,

date_table[date_column] >= mindate ,

return res

 

 

 

tell me if it works out for you . 

if you have any concerns feel free to share them so i can assist you  . 

 

 

 

If my response has successfully addressed your issue kindly consider marking it as the accepted solution! This will help others find it quickly. Dont forget to hit that  thumbs up button 🫡👍

 

 

 

View solution in original post

1 REPLY 1
Daniel29195
Super User
Super User

@MikeSwe 

assuming, your chart have date column in it : 

to create a running total. use this  

measure = 

var maxdate  = max(date_table[date_column])
var res = 

calculate (
sum(table_name[col_name]),
all(date_table) , 
date_table[date_column] < = maxdate ) 

return res

 

 

option2 :  

this will take into consideration the period selected, and will start your running total base on your selection : 

measure = 

var maxdate  = calculate( max(date_table[date_column]))

var mindate = calculate( min (date_table[date_column] ,  allselected( date_table[date_column]) ) 
var res = 

calculate (
sum(table_name[col_name]),
all(date_table) , 
date_table[date_column] < = maxdate ,

date_table[date_column] >= mindate ,

return res

 

 

 

tell me if it works out for you . 

if you have any concerns feel free to share them so i can assist you  . 

 

 

 

If my response has successfully addressed your issue kindly consider marking it as the accepted solution! This will help others find it quickly. Dont forget to hit that  thumbs up button 🫡👍

 

 

 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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