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.
Hello,
It would be awesome for the solution to be inside power query.
I have a data set where all of column X should have capital letters. If there is a lowercase letter, then there is a user error.
My goal is to identify those that have this error among others inside a dashboard.
Example:
X | Y |
NIF15181SK | 0 |
NIF15171SK | 0 |
NIF15182SK | 0 |
NIf15182SK | SP Error |
Highlighted the error here on the 'f' in the last row.
Solved! Go to Solution.
Hi @Cary_Casey
this is pretty easy to check in the query editor. Just add a column with this formula:
[X] = Text.Upper([X])
it compares if the content of column [X] matches its "uppercased" version
Full code to follow along:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8vN0MzQ1tDAM9laK1YFxzVG5FkZwbhqcGwsA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [X = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"X", type text}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Test", each [X] = Text.Upper([X]))
in
#"Added Custom"
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Hi @Cary_Casey
this is pretty easy to check in the query editor. Just add a column with this formula:
[X] = Text.Upper([X])
it compares if the content of column [X] matches its "uppercased" version
Full code to follow along:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8vN0MzQ1tDAM9laK1YFxzVG5FkZwbhqcGwsA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [X = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"X", type text}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Test", each [X] = Text.Upper([X]))
in
#"Added Custom"
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
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 |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |