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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Julian_12
New Member

Measure, which sums the last item from each group

Hi All,

 

I need to a create a risk burndown chart for a product with multiple components. Components have their test or analysis completed at some point in times, which reduce the risk. My burndown chart has to show how much total risk is left at the particular time and what risk band it is (see table below). I believe that I need a measure, which will sum the [Risk total per component] of the last row for each component per date. Please note that the same component can have multiple risk reductions at the same date. I would use [Risk Band] as a legend to get the stuck-up.

Julian_12_1-1639493246432.png

- csv format

Component,Development Risk Change,Risk total per component,Test/Analysis Date,Risk Band
A,20,20,26/01/2021,amber
A,-5,15,02/05/2021,amber
A,-2,10,10/11/2021,green
A,-3,10,10/11/2021,green
B,30,30,26/01/2021,red
B,-12,18,09/10/2021,amber
B,-10,6,23/11/2021,green
C,40,40,26/01/2021,red
C,-12,28,12/05/2021,red
C,-8,20,18/07/2021,red
C,-7,13,22/11/2021,amber

The chart would like something like the follow.

Julian_12_0-1639494919280.pngJulian_12_2-1639493322444.png

 

 

7 REPLIES 7
parry2k
Super User
Super User

@Julian_12 since @negi007 is working on it, and you are in safe hands. In case it doesn't work out, just ping me. Good luck!



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

negi007
Community Champion
Community Champion

@Julian_12  in this case, i suggest you to follow below steps

 

in power query window, please add a index column like below

negi007_0-1639495451493.png

 

then in your power bi create a measure to find out last row value for each component

Last_row_cat = if ( CALCULATE ( MAX ( 'tab'[Index] ), ALLEXCEPT (tab, tab[Component] ) )=tab[Index], "last row", "others")
 
negi007_1-1639495529536.png

 

i am also attaching pbix working file for reference. 

 

 




Did I answer your question? Mark my post as a solution!
Appreciate your Kudos



Proud to be a Super User!


Follow me on linkedin

Hi @negi007 , would it be possible to use date from the date from the [Test/Analysis Date] column as the index, as my rows are not in date order? Your formula identifies last row per component. How to make a measure from it so I could plot it against time?

@Julian_12 you can do the soring on multiple columns like below and then add the index column

 

let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("jc47CoAwEATQu6QWNrN+sFWPIRaKwUqL3L9wN/EDasBmyfKSmfS9aUxm2MoAcUVsGXIe18l5M2SRUcooiRMaHoNgT1+8c9svb2XLn+XezRei1huEd7VqlfpXJ1sRc/GMVWON5YTZkFp8GXJtve1oHHY=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Component = _t, #"Risk total per component" = _t, #"Analysis date" = _t, #"risk band" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Component", type text}, {"Risk total per component", Int64.Type}, {"Analysis date", type date}, {"risk band", type text}}),
#"Sorted Rows" = Table.Sort(#"Changed Type",{{"Component", Order.Ascending},{"Analysis date", Order.Ascending}}),
#"Added Index" = Table.AddIndexColumn(#"Sorted Rows", "Index", 1, 1, Int64.Type)
in
#"Added Index"

 

 

here is updated file for you as well.




Did I answer your question? Mark my post as a solution!
Appreciate your Kudos



Proud to be a Super User!


Follow me on linkedin

Hi @negi007, thank you for your answers. But how I could plot the risk burndown graph, as per orginal post  from this functions?

parry2k
Super User
Super User

@Julian_12 provides the data in the table format so that it can be copied, also what happens if there is a tie, two records of a component, and the same risk band.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Hi @parry2k , thank you for the question. I updated the post with the data. Each component risk will be going down with every test/analysis. If the risk go below a threshold then the whole remaing risk move to a lower band. I think it is already covered by [running total risk by component]. I already creted risk running total per component and it reduces sum of the risk on that date if it happens more than one on the date (see rows 3 and 4 for component A).

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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