Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi @Seeker201,
It seems like you removed the detail requirement from the thread. Can you please share some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.
How to Get Your Question Answered Quickly
Notice: please not attach sensitive data in shared dummy data.
Regards,
Xiaoxin Sheng
Hello @Seeker201 ,
Unfortunately, there is no description in the topic you've provided. Please, add the description, some demo data (a fake one that resembles your real one) and a desired output.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos.
Check out my latest demo report in the data story gallery.
Stand with Ukraine!
Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/
Thank you!
@Seeker201
You have deleted the description. Please let me know if it is a data confidentiality issue.
However, I lost track of the conditions so the following may not be accurate but it describes the general idea on how to perform complex data validation.
I would also recommend to store numbers, letters, special characters in manually created tables. That would make the DAX much cleaner.
Note: Another method which implies a "Cause & Effect Matrix" which is a pivoted table, may also be used to serve the same purpose but I guess won't be required in this scenario.
Test2 =
VAR SpecialCharacters = { "~", "@", "#", "$", "%", "^", "*", "(", ")", "_", "-", "+", "=", ":", ";", "'", "\", "/", "|", "{", "}", "[", "]", "?", ",", ".", "<", ">", "!", "`", " " }
VAR Letters = { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z" }
VAR Numbers = SELECTCOLUMNS ( GENERATESERIES ( 0, 9, 1 ), "Number", [Value] & "" )
RETURN
COUNTROWS (
FILTER (
CustomerContactQuality,
VAR String = CustomerContactQuality[CustomerAddress]
VAR Length = COALESCE ( LEN ( String ), 1 )
VAR T1 = GENERATESERIES ( 1, Length, 1 )
VAR T2 = SELECTCOLUMNS ( T1, "@Letter", MID ( String, [Value], 1 ) )
VAR NotEmpty = String <> BLANK ( )
VAR ContainsSpecialCharacters = NOT ISEMPTY ( INTERSECT ( SpecialCharacters, T2 ) )
VAR ContainsNumbers = NOT ISEMPTY ( INTERSECT ( Numbers, T2 ) )
VAR DoesNotContainLetters = ISEMPTY ( INTERSECT ( Letters, T2 ) )
RETURN
IF ( NotEmpty && ContainsSpecialCharacters, ContainsNumbers || DoesNotContainLetters, FALSE )
)
)
hi, @Seeker201
try below code
Hi @Seeker201
can you provide a couple of examples describing the expected result?
Hi @tamerj1
As of now, I don't have a specific expected result for that, but I have provided clear logic for the requirement
related to malformed addresses in my model, which is based on the customeraddress column
If you could provide me with the DAX for both requirements, it would be greatly appreciated
I requested an example because I don't have access now to my laptop to open your ssmple file. Perhaps one example would help draft a code without having to look into the file.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
7 | |
7 | |
6 | |
6 |
User | Count |
---|---|
27 | |
12 | |
10 | |
9 | |
6 |