Forum Discussion
Pass fail count from total count group by
- 2 years ago
Hello Anonymous,
Do you perhaps have a screenshot or sample data so that the community can get a better idea of your problem?
Or maybe this little example will help you:let //Replace the first Step with your Data Table //Source = YourDataTable Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8kksKMkvUNJRKkgsLlaK1YlWCk7NK84vQhZxySwuyEmsRBZyTgSpSEvMzAFznTKzU5GlAzLy81KRFfhmJiNzPVITUwpQ1MQCAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Device Name" = _t, #"Device Status" = _t]), Type = Table.TransformColumnTypes(Source,{{"Device Name", type text}, {"Device Status", type text}}), Grouped = Table.Group(Type, {"Device Name", "Device Status"}, {{"Count", each Table.RowCount(_), Int64.Type}}), Pivoted = Table.Pivot(Grouped, List.Distinct(Grouped[Device Status]), "Device Status", "Count", List.Sum) in Pivoted
Best regards from Germany
Manuel Bolz
🟦Follow me on LinkedIn
🟨How to Get Your Question Answered Quickly
🟩Fabric Community Conference
🟪My Solutions on Github - Anonymous2 years ago
Please find the below screen shots , this is the original table
Below is the table after grouping
The transformation i used to group device name based on device status da_status is as below.
= Table.Group(dbo_vw_ehas_dashboard, {"device_name", "da_status"}, {{"device_dastatus", each Table.RowCount(_), Int64.Type}})
Hello Anonymous,
Do you perhaps have a screenshot or sample data so that the community can get a better idea of your problem?
Or maybe this little example will help you:
let
//Replace the first Step with your Data Table
//Source = YourDataTable
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8kksKMkvUNJRKkgsLlaK1YlWCk7NK84vQhZxySwuyEmsRBZyTgSpSEvMzAFznTKzU5GlAzLy81KRFfhmJiNzPVITUwpQ1MQCAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Device Name" = _t, #"Device Status" = _t]),
Type = Table.TransformColumnTypes(Source,{{"Device Name", type text}, {"Device Status", type text}}),
Grouped = Table.Group(Type, {"Device Name", "Device Status"}, {{"Count", each Table.RowCount(_), Int64.Type}}),
Pivoted = Table.Pivot(Grouped, List.Distinct(Grouped[Device Status]), "Device Status", "Count", List.Sum)
in
Pivoted
Best regards from Germany
Manuel Bolz
🟦Follow me on LinkedIn
🟨How to Get Your Question Answered Quickly
🟩Fabric Community Conference
🟪My Solutions on Github
Please find the below screen shots , this is the original table
Below is the table after grouping
The transformation i used to group device name based on device status da_status is as below.
= Table.Group(dbo_vw_ehas_dashboard, {"device_name", "da_status"}, {{"device_dastatus", each Table.RowCount(_), Int64.Type}})