Forum Discussion
Creating a Flag
Very new to using PowerBi I was looking for a video that demonstrated how to create a flag on certain data. For example "bad" email addresses. Not sure if this gives enough context - hoping someone may be able to assist. Thank you!
- Anonymous2 years ago
Hi ocmarketing ,
Please refer to this thread:
let IsValidEmail = (input as text) => let name = Text.BeforeDelimiter(input,"@",{0,RelativePosition.FromEnd}), ext = Text.AfterDelimiter(input,".",{0,RelativePosition.FromEnd}), domain = Text.BetweenDelimiters(input,name&"@","."&ext), return = Text.Length(name) > 0 and Text.Length(domain) > 0 and Text.Length(ext) > 1 and Text.Length(ext) < 6 and name = Text.Select(name, {"a".."z","A".."Z","0".."9","_","-","."}) and domain = Text.Select(domain, {"a".."z","A".."Z","0".."9","_","-","."}) and ext = Text.Select(ext, {"a".."z","A".."Z"}) in return in IsValidEmailYou can further mark up these values by using conditional formatting colors. If I have misunderstood your question or you need further help please feel free to contact me.
Apply conditional table formatting in Power BI - Power BI | Microsoft Learn
Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group
2 Replies
- NaveenGandhiMemorable Member
Hi ocmarketing
Please provide sample file and sample expected output to understand the problem better.
Regards,
NG - AnonymousNot applicable
Hi ocmarketing ,
Please refer to this thread:
let IsValidEmail = (input as text) => let name = Text.BeforeDelimiter(input,"@",{0,RelativePosition.FromEnd}), ext = Text.AfterDelimiter(input,".",{0,RelativePosition.FromEnd}), domain = Text.BetweenDelimiters(input,name&"@","."&ext), return = Text.Length(name) > 0 and Text.Length(domain) > 0 and Text.Length(ext) > 1 and Text.Length(ext) < 6 and name = Text.Select(name, {"a".."z","A".."Z","0".."9","_","-","."}) and domain = Text.Select(domain, {"a".."z","A".."Z","0".."9","_","-","."}) and ext = Text.Select(ext, {"a".."z","A".."Z"}) in return in IsValidEmailYou can further mark up these values by using conditional formatting colors. If I have misunderstood your question or you need further help please feel free to contact me.
Apply conditional table formatting in Power BI - Power BI | Microsoft Learn
Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group