Forum Discussion
Power BI Charting
I have the following dataset:
Id | Country | Analysis 1 | Analysis 2 | Analysis 3 | Analysis 4 |
1 | Boksoa | HPLC | UV-Vis Spectroscopy | Disolution | Uniformity of weight |
2 | Namleme | Dissolution | HPLC | UV | TLC |
3 | Nbeeke | HPLC | UV-Vis Spectroscopy | IT | Titration |
6 | Naebbe | Dissolution | HPLC | UV-Vis | Disintegration |
4 | Cmanekek | Melting Point | pH | polarimetry | Disintegration |
5 | BVNindnd | Dissolution | titration | pH | chromatography |
7 | Cmamine | Visual inpsection | verification of weight | disintegration test |
|
8 | Condnenen | pH | desitometry | disintegration | dissolution |
9 | Etbeifnf | Visual Inspection | pH | Solubility | Viscosity |
12 | Gunenene | TLC | Colorimetric reactions | disintegration tests | pH |
13 | Kanemee | Identification | Assay | dissolution | UDU |
23 | Seknuan | Dissolution | HPLC | UV-VIS | Titration |
14 | Laborne | Identification | pH | Disintegration | dissolution |
15 | Manriandd | Uniformity of weight | Thin layer Chromatograpgy | dissolution | Disintegration |
16 | Malianeing | Uniformity of dosage units | Dissolution of oral solid dosage forms | pH determination | UV-VIS Spectrophotometry |
17 | Marirange | HPLC | UV-Vis | dissolution | IR |
18 | Marinagene | Caractères macroscopiques | Poids moyen | Temps de fusion | Epaisseur |
19 | Monaconeke | Dissolution | HPLC | Karl Fisher | UV-Vis |
20 | Nidmanei | Titrimetry | Uniformity of mass | ID and assay by UV |
|
21 | Neriana | Dissolution | Titrimetry | UDU | Karl Fisher |
24 | Siandndne | ASSAY | CONTENT UNIFORMITY | WEIGHT UNIFORMITY | dissolution |
25 | Sudnaindd | Include appearance | label | identification | dissolution |
29 | Ugndinenen | Appearance | weight uniformity | identification | assay |
26 | Tanmienene | Medicines and Complementary Product Analysis sections (physico-chemical | identification | assay | impurities |
30 | Zambumodi | HPLC | UV-Vis Spectroscopy | IR | KF |
31 | Zambuko | Aflatoxin | Food Testing |
|
|
32 | Zamunda | HPLC | UV-Vis Spectroscopy | FTIR | Potentiometric |
I need to have a chart which summarizes which Analysis Test each country does, for example, which countries do "HPLC" analysis, which countries do "UV-Vis Spectroscopy" and so forth.
Can someone assist how this can be done in Power BI.
Regards,
Chris
Hi Chitemerere ,
Select all the analysis columns>unpivot the columns,and you will see:
Back to the report view,you will see:
For the related .pbix file,pls see attached.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
5 Replies
- Greg_DecklerCommunity Champion
Chitemerere You need to unpivot your Analysis columns.
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("jVbNcts4DH4Vjk89tDN1sv07uk6caFq7mVhJZzeTAyXCNsYiqSWp3dXb5NjnaF+sACk5dmxvMj6IIokPH4APkO/uBsPB68Fnu/ZW0uLy6uuYHj8fbm7f3KIX8xrK4Kwvbd3G/TP0tmoCWpOuGVxYpzG0wi7Ev4DLVRjcv74bnNDxTOoKNNCKrHbMttzER06vbHXKVgXAGl7CJcuTMQYnIzRDvI+OoSie8cuQfURoAiy3MP6gg7GWhnisfz7QyxSqgGYprixdjVb1ZXrYSjrUEFx7DOwd5/d2hkYZdYBS2LDfgi1XzmoZLOHUqzbCfEicNBoOjMg3shJoak9J6a3/AYcLLCPcVj34SO0QEwE870fkj4xsiR7Qj9YdBwUeg30MbReh39rEwkifaPc8FIALs3gkmRlfb5Hs4OdkWGBFyomvdLe0nt8YaMjyuWgiIw4378o2tpVN6cZSOJAR1R8L0Pf+IiRr6wvVVAMjZgpM2CQrXhx5L9u9uKJazm6SqBljDmvTSPN/6kr6yuYH5DlkbX2VhXXmCI0uP/w7ez7lQ5bXVBqH0ijW18GOjDxWaEQlW3BivCWv5eGQDwh5+D66qsgTUDPs+VLWyyWIxmDYdFaPyefWkRhoA1V/lY37IgkFAQjLPMaaktj3fb2yvRwjmw+RjUMnzfLAuDgYVXadbD92toZYxDqMpSMx/frhwAstyzRl8O8GfFcM6nxFR7YF0+3koGtPrMWi8T3+eS3JIzQuueF+mFojS2vSSDuqmC/SVWKCfgVuO4Yourc80VDxPELuBdLT1sTZrYGWPjHOzgQJQkjWtChaEQdtwuOBPwMWjDxA6Sk8Sf8pwYjCOp6z6Hhw0Ho0n4/+TE36bZafz3JxM8sm366nWZ62v59nF5d7u0/1fMJ6njfKSEx6zkxZNZRlWddARTIlRLtKFlDFFe630B4oF+JmaRT2M260i5bahKXb5fIYcsxnwuRuyKXR2A+pKSgsyYOPmR9bXfPXzwTpWnHlrGrKIEZGVq2nj1k3tr14RQPeY2nflCvQ5OpoUHIznlDXjcOAkARyygL5S+qi0Vbhiz6c16mmk2Q/7O3XllOzqGg0/IfJ68RaJXIapqnjexGdniSbxqgX/W2Y5J3PKxs4Mptm+OD+/jc=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Id = _t, Country = _t, #"Analysis 1" = _t, #"Analysis 2" = _t, #"Analysis 3" = _t, #"Analysis 4" = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"Id", Int64.Type}, {"Country", type text}, {"Analysis 1", type text}, {"Analysis 2", type text}, {"Analysis 3", type text}, {"Analysis 4", type text}}), #"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"Id", "Country"}, "Attribute", "Value") in #"Unpivoted Columns"- ChitemerereResponsive Resident
Many thanks for your response. Looking at the example from Radacad you gave me, i am made to understand that the route to take is to "Pivot" and not "Unpivot"??
- v-kelly-msftCommunity Support
Hi Chitemerere ,
Select all the analysis columns>unpivot the columns,and you will see:
Back to the report view,you will see:
For the related .pbix file,pls see attached.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
- amitchandakSuper User
Chitemerere , Better to unpivot the data. There is an option on Power query/edit query/Transform Data. Use that. : https://radacad.com/pivot-and-unpivot-with-power-bi