Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hello everyone,
I had conducted a questionnaire and received data very similar to the below situation:
I wish to get a form of visual that shows the count of each element individually, but when I am trying I am getting the below visual.
The aim is to try go for the following visual which shows each element seperately and not like the above visual which has all the elements together.
Would appreciate any assistance with this,
Thanking you in advance!
Solved! Go to Solution.
Hi @Miguelgm28
It will be easy to count when you have a Responsible Organization Table full of organization names.
You just need to create a measure
count =
VAR _name =
MAX ( 'Responsible Organization Table'[name] )
RETURN
CALCULATE (
COUNTROWS ( 'Table' ),
CONTAINSSTRING ( 'Table'[Responsible organization], _name )
)
Then, you will get:
Hope it helps.
Best Regards,
Community Support Team _ Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Hi @Miguelgm28
It will be easy to count when you have a Responsible Organization Table full of organization names.
You just need to create a measure
count =
VAR _name =
MAX ( 'Responsible Organization Table'[name] )
RETURN
CALCULATE (
COUNTROWS ( 'Table' ),
CONTAINSSTRING ( 'Table'[Responsible organization], _name )
)
Then, you will get:
Hope it helps.
Best Regards,
Community Support Team _ Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Hi @selimovd
Just to confirm you are saying that first I would need to split the data within the column in Power Query by semicolan and then after unpivot to create multiple rows?
Wouldn't this make the system think that each new additional row is a new entry to the questionnaire?
Thank you once again,
Miguel
Hey @Miguelgm28 ,
split the data in Power Query by comma and then group it by the values.
This should give you the result.
Thanks @selimovd for your response so I split the data in Power Query by semicolan and now I got 8 additional columns.
Could you further assist me please? I got stuck with "group it by the values" you previously mentioned, did not fully understand what you meant by this.
Thank you,
Miguel
Hi,
In the Split window, click on Advanced and select Split by rows.
Hi @Ashish_Mathur,
I am definitely missing something here I have a similar problem but with 6 columns with questionnaire responses split by semi-colons.
I have split each column by that delimeter and selected rows in the advanced option but this creates many duplicates of responses I don't want (1500+) rows - is there a group by step or something else I've missed?
Thank you!
Hi,
Share some data in a format that can be pasted in an MS Excel file and show the expected result.
Hey @Miguelgm28 ,
sorry, I was also not precise. You should unpivot the columns after splitting them, then you have a new row for each item.
Check the following Power Query example:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8i9Kd7QGEk4gwlkpVgcsBGegCYN4jjAekBELAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Organization = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Organization", type text}}),
#"Split Column by Delimiter" = Table.SplitColumn(#"Changed Type", "Organization", Splitter.SplitTextByDelimiter(";", QuoteStyle.Csv), {"Organization.1", "Organization.2", "Organization.3"}),
#"Changed Type1" = Table.TransformColumnTypes(#"Split Column by Delimiter",{{"Organization.1", type text}, {"Organization.2", type text}, {"Organization.3", type text}}),
#"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Changed Type1", {}, "Attribute", "Value")
in
#"Unpivoted Columns"
Hi, I am going through the same thing - what will happen when additional options are added onto the columns e.g. Service 1: now had service 1, service 2, service 3?
Would this be added onto the column after unpivot step as been applied?
Hope that makes sense.
User | Count |
---|---|
141 | |
113 | |
104 | |
77 | |
64 |
User | Count |
---|---|
135 | |
123 | |
101 | |
71 | |
61 |