Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I want to have a count of the "true" records found in different columns by clients.
Example data below:
Thanks
Solved! Go to Solution.
Hi @Anonymous ,
Please check the following steps as below.
1. Unpivot the table as below then close and apply.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSlTSUXJz9Al2BdIhQaFwKlYnWikJTQymEiSXjKQPlQbJpuCVTcW0EyoZCwA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [name = _t, crm_car = _t, crm_com = _t, crm_atm = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"name", type text}, {"crm_car", type logical}, {"crm_com", type logical}, {"crm_atm", type logical}}),
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"name"}, "Attribute", "Value")
in
#"Unpivoted Other Columns"
2. Create a matrix based on the measure.
Measure 2 =
IF (
ISINSCOPE ( 'Table'[Attribute] ),
CONCATENATEX ( 'Table', 'Table'[Value] ),
CALCULATE (
COUNTROWS ( 'Table' ),
FILTER ( 'Table', 'Table'[Value] = TRUE () )
) + 0
)
Pbix as attached.
Hi,
That is the final visual you are showing us. Share the actual data, describe the question and show the expected result.
Here is my data;
What a want to get is te count of the true récords.:
Hi @Anonymous ,
Please check the following steps as below.
1. Unpivot the table as below then close and apply.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSlTSUXJz9Al2BdIhQaFwKlYnWikJTQymEiSXjKQPlQbJpuCVTcW0EyoZCwA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [name = _t, crm_car = _t, crm_com = _t, crm_atm = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"name", type text}, {"crm_car", type logical}, {"crm_com", type logical}, {"crm_atm", type logical}}),
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"name"}, "Attribute", "Value")
in
#"Unpivoted Other Columns"
2. Create a matrix based on the measure.
Measure 2 =
IF (
ISINSCOPE ( 'Table'[Attribute] ),
CONCATENATEX ( 'Table', 'Table'[Value] ),
CALCULATE (
COUNTROWS ( 'Table' ),
FILTER ( 'Table', 'Table'[Value] = TRUE () )
) + 0
)
Pbix as attached.
Hi,
What is the purpose of sharing the second image? Share the link from where I can download your PBI file (with your build in visual). Also, since in think I may need to carry out a transformation in the Query Editor, also share the base Excel file from where you would have imported data to PBI desktop.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
97 | |
97 | |
81 | |
77 | |
66 |
User | Count |
---|---|
126 | |
105 | |
103 | |
81 | |
72 |