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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Phoenix12
Frequent Visitor

Count open cases along with the amount associated with the open cases

Hello, 

I'm pretty new to Power BI and I'm trying to create a report with the total open cases for the month and total amount associated to the cases remaining open. Can someone help with me figure out how I can accomplish this? 

 

Table 

 IDCreated DateClosed DateStatusAmount 
110/1/202211/2/2022Closed$10
210/5/202210/25/2022Closed$5
310/8/2022 Open$10
410/20/202210/25/2022Closed$13
510/31/2022 Open$10
611/1/202211/30/2022Closed$25
711/12/2022 Open$15
811/15/202211/26/2022Closed$3
911/20/2022 Open$10
1011/28/2022 Open$5
1112/2/202212/10/2022Closed$6
1212/5/2022  $5
1312/9/2022 Open$10
1412/15/2022 Open$10
1512/20/202212/28/2022Closed$5

 

Expected Results: 

MonthOpen CountOpen Amount
Oct 20222$20
Nov 20223$30
Dec 20223$25
3 REPLIES 3
alannavarro
Resolver I
Resolver I

Hello, you can paste this in the advance editor
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("hZJBCsIwEEWvIsFlITOTTmzXPYAHCN3Znajg/cHo/NpIQ4QsPuTx8idJSo5d55g8eyGRd85pzdP1/lwuORyZDm7ukhOj9UuTF93janQwYliBvM6P5VYKe0joj5GD8WpI4IYz2hjlSIH2SkHLE3CpKcEMYLS8prh3ouUIghotmQDVrgfH8ud1ZHuRnLkySgQORAtjaQu2PbZa9ThFW5CiFhW9tjl+/8H8Ag==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [ID = _t, #"Created Date" = _t, #"Closed Date" = _t, Status = _t, #"Amount " = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Created Date", type date}, {"Amount ", type number}}),
#"Filtered Rows" = Table.SelectRows(#"Changed Type", each ([Status] = "Open")),
#"Removed Other Columns" = Table.SelectColumns(#"Filtered Rows",{"Created Date", "Amount "}),
#"Inserted Month Name" = Table.AddColumn(#"Removed Other Columns", "Month Name", each Text.Start(Date.MonthName([Created Date]),3) & " " & Number.ToText(Date.Year([Created Date]))),
#"Grouped Rows" = Table.Group(#"Inserted Month Name", {"Month Name"}, {{"Open Count", each Table.RowCount(_), Int64.Type}, {"Open Amount", each List.Sum([#"Amount "]), type nullable number}})
in
#"Grouped Rows"

PawelWrona
Resolver II
Resolver II

Hello, for the number of Open Cases you can go with following formula:

CALCULATE(DISTINCTCOUNT('Table'[ID]), 'Table'[Status] <> "Closed")
 
Similarly, for value of open cases you would do:
CALCULATE(SUM('Table'[Amount]), 'Table'[Status] <> "Closed")
 
To represent these values on a month level, would be good to have a Calendar table, linked to your [Created Date] column, so you have additional date values available llike month, quarter and year.
 
Please, let me know if this is what you needed.

This did work the way it's intended, but I realized the model I need, I additionally need is if the case was closed outside of the month the case was created, then this would be added into the "Open" amount 
For example: October would be $30 due to the one case being closed in November

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

Top Kudoed Authors