Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello..
I have a table such as below. I want to subtract the failed call from the total call and put the result in a new row (success_call).
Can anyone who has information about this subject help me?
Call Type | Count | |
total_call | 10000 | |
Failed_call | 100 | |
Success_Call | 9900 | new rows |
Solved! Go to Solution.
Hi @u4us1923, you can do this easily in Excel but here you go:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WKskvScyJT07MyVHSUTI0AAKlWJ1oJbfEzJzUFCRxpdhYAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Call Type" = _t, Count = _t]),
ChangedType = Table.TransformColumnTypes(Source,{{"Count", type number}}),
Ad_SuccessCall_Row = Table.InsertRows(ChangedType, 2, {
[ Call Type = "Success_Call",
Count = [ t = Table.SelectRows(ChangedType, (x)=> Text.Contains(x[Call Type], "total", Comparer.OrdinalIgnoreCase))[Count]{0}?,
f = Table.SelectRows(ChangedType, (x)=> Text.Contains(x[Call Type], "failed", Comparer.OrdinalIgnoreCase))[Count]{0}?,
result = t-f
][result]
] } )
in
Ad_SuccessCall_Row
Hi @u4us1923, you can do this easily in Excel but here you go:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WKskvScyJT07MyVHSUTI0AAKlWJ1oJbfEzJzUFCRxpdhYAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Call Type" = _t, Count = _t]),
ChangedType = Table.TransformColumnTypes(Source,{{"Count", type number}}),
Ad_SuccessCall_Row = Table.InsertRows(ChangedType, 2, {
[ Call Type = "Success_Call",
Count = [ t = Table.SelectRows(ChangedType, (x)=> Text.Contains(x[Call Type], "total", Comparer.OrdinalIgnoreCase))[Count]{0}?,
f = Table.SelectRows(ChangedType, (x)=> Text.Contains(x[Call Type], "failed", Comparer.OrdinalIgnoreCase))[Count]{0}?,
result = t-f
][result]
] } )
in
Ad_SuccessCall_Row
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
15 | |
11 | |
8 | |
8 | |
7 |
User | Count |
---|---|
15 | |
13 | |
9 | |
7 | |
6 |