Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in BI by (11.1k points)

They are two tables table 1 and table 2

Category 
A
B
... 
Companies | Indistries
1         | A,D,X
2         | Z,B,X
3         | N,D,R,B,Q
I need to create a slider with different categories

1 Answer

0 votes
by (22.5k points)

Create a calculated field 

let
    Source = your_table_name,
    #"Split Column by Delimiter" = Table.SplitColumn(Source, "Indistries", Splitter.SplitTextByDelimiter(", ", QuoteStyle.Csv), {"Indistries.1", "Indistries.2", "Indistries.3", "Indistries.4"}),
    #"Changed Type" = Table.TransformColumnTypes(#"Split Column by Delimiter",{{"Indistries.1", type text}, {"Indistries.2", type text}, {"Indistries.3", type text}, {"Indistries.4", type text}}),
    #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"Index"}, "Attribute", "Value"),
    #"Removed Columns" = Table.RemoveColumns(#"Unpivoted Other Columns",{"Attribute"})
in
    #"Removed Columns"

The output of table will be shown like this

enter image description here

If you want to learn more about Power BI, then read the Power BI Tutorial. Also, enroll in Power BI Training to become proficient in this BI tool.     

Related questions

0 votes
1 answer
asked Dec 8, 2020 in BI by Chris (11.1k points)
0 votes
1 answer
0 votes
1 answer
asked Feb 28, 2021 in BI by Chris (11.1k points)
0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...