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.
I want to create new columns from values from one column in power bi. How do I do that? Let's say for instance from the table below, I want to create new columns for different states from the state column that will count the number of companies that are headquartred in that state, how will I do that in power bi
Company Id | Company Name | States | Alabama | Texas | Illinois | Michigan | Ohio |
1 | Xtech | Alabama | 2 | 4 | 1 | 2 | 3 |
2 | Coliq | Texas | |||||
3 | Fimtec | Illinois | |||||
4 | Witnog | Michigan | |||||
5 | Gnamew | Ohio | |||||
6 | Zenith | Texas | |||||
7 | Lever | Michigan | |||||
9 | Gum | Texas | |||||
10 | Hunlec | Ohio | |||||
11 | Girthlow | Ohio | |||||
12 | Tetlow | Alabama | |||||
13 | Doughlas | Texas |
New Table =
ROW (
"Alabama", COUNTROWS ( FILTER ( Data, Data[States] = "Alabama" ) ),
"Texas", COUNTROWS ( FILTER ( Data, Data[States] = "Texas" ) ),
"Illinois", COUNTROWS ( FILTER ( Data, Data[States] = "Illinois" ) ),
"Michigan", COUNTROWS ( FILTER ( Data, Data[States] = "Michigan" ) ),
"Ohio", COUNTROWS ( FILTER ( Data, Data[States] = "Ohio" ) )
)
https://www.dropbox.com/s/lr6vx7fu3fv8m1j/joparaugo.pbix?dl=0
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
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 |
---|---|
46 | |
25 | |
19 | |
16 | |
8 |
User | Count |
---|---|
73 | |
50 | |
45 | |
20 | |
17 |