Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
vinothkumar1990
Helper II
Helper II

Display only the specific text and remove duplicate text

Hi,

I have two columns in a dataset called ID and Message. Message contains multiple lines and each line represent a specific message.

My requirement is

1. I want to show the data(line) only that cotains two specific key words i.e. M-3 or Error.

2. Sometime there couls be duplicate line items. In such case i want to show only distinct value

 

Below is a example. Is there anywat to achive this?

 

Examples:

vinothkumar1990_0-1681314214273.png

 

 

IDMessageExpected Message
1M-1: Message1.
M-2: Message2.
M-3: Error. Message3.
M-3: Error. Message3.
2M-3: Error. Message3.M-3: Error. Message3.
3M-1: Message1.
M-2: Message2.
M-3: Message3.
M-4: Message4.
M-3: Message3.
4M-1: Message1.
M-2: Message2.
M-4: Error.
M-4: Error.
4M-4: Error.
M-4: Error.
M-4: Error.

Thanks in advance!

1 ACCEPTED SOLUTION
v-jianboli-msft
Community Support
Community Support

Hi @vinothkumar1990 ,

 

Please try to apply the measure to the visual level's filter:

Flag = IF(OR(CONTAINSSTRING(SELECTEDVALUE('Table'[Message]),"M-3"),CONTAINSSTRING(SELECTEDVALUE('Table'[Message]),"Error")),1,0)

vjianbolimsft_0-1681451807735.png

Final output:

vjianbolimsft_1-1681451820772.png

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-jianboli-msft
Community Support
Community Support

Hi @vinothkumar1990 ,

 

Please try to apply the measure to the visual level's filter:

Flag = IF(OR(CONTAINSSTRING(SELECTEDVALUE('Table'[Message]),"M-3"),CONTAINSSTRING(SELECTEDVALUE('Table'[Message]),"Error")),1,0)

vjianbolimsft_0-1681451807735.png

Final output:

vjianbolimsft_1-1681451820772.png

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.