The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hey guys,
I have a column that looks like this:
State
AL
Alabama
TN
Tennessee
AL
AL
VA
VA
Alabama
Virgina
Tennessee
How do I create one column that has the full name for every state?
Solved! Go to Solution.
@Anonymous
Import the data from http://www.stateabbreviations.us/ via Web
& go Edit Queries use > Home Tab > Merge Queries
#"Added Conditional Column" = Table.AddColumn(#"Duplicated Column", "State", each if [state old] <> [#"state new"] then [#"State New"] else null )
Regards,
Chetan K
@Anonymous
Import the data from http://www.stateabbreviations.us/ via Web
& go Edit Queries use > Home Tab > Merge Queries
#"Added Conditional Column" = Table.AddColumn(#"Duplicated Column", "State", each if [state old] <> [#"state new"] then [#"State New"] else null )
Regards,
Chetan K
You could look at the length of the value. If 2, then do a look up, else, show original value. This should be pretty easy to do in DAX.
Treb Gatte | MVP | TumbleRoad.com | PowerBICertification.com
As @trebgatte mentioned, you'll need to have some master lookup table for the states abbreviation and full name. Then you can create a new calculated column that checks the length, and pulls the [StateFullName], otherwise it defaults to the existing value.
New to Power BI & Data: Can you provide the formula you would use to calculate length and pull state name. Once I see it I can make the connection to how it works.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
80 | |
78 | |
47 | |
39 |
User | Count |
---|---|
148 | |
115 | |
65 | |
64 | |
53 |