cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ogh_sabyasachi
Helper III
Helper III

How to get distinct values in a html text?

Hi community,

 

I have an html text where I am filtering a collection and getting the list as in the attached screenshot.  Is there any way we can get the distinct values here.  For eg:  we want "HIPAA Rules & Regulations" just appear once.

1 ACCEPTED SOLUTION

Accepted Solutions

You can use the Distinct function to retrieve only the unique values for the FullNameOfCourse column in your filtered expression:

"<table width='100%' border='1' cellpadding='5' style='border:1px solid black; border-collapse:collapse'>" & "<tr style='background-color:#efefef' >
<td> Course Name </td>
</tr>" &
Concat(
    Sort(
        Distinct(
            Filter(MyTempCol2, Full_Name in ([@PowerBIIntegration]).Data.Full_Name),
            FullNameOfCourse),
        Result),
    "<tr><td>" & Result & "</td></tr>"
) & "
</table>"

 Hope this helps!

View solution in original post

3 REPLIES 3
mdevaney
Super User
Super User

@ogh_sabyasachi 
I think I know how to help you but I do not want to retype all of the code in your picture.  Please copy and paste your code as text into the forums and I'll make my suggestions.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Hi @mdevaney ,

 

This is the html code I am using.  Hope this is helpful.  Please suggest the solution.  Thanks.

 

"<table width='100%' border='1' cellpadding='5' style='border:1px solid black; border-collapse:collapse'>" & "<tr style='background-color:#efefef' >
<td> Course Name </td>
</tr>
" & Concat(Sort(Filter(MyTempCol2, Full_Name in ([@PowerBIIntegration]).Data.Full_Name),FullNameOfCourse),

"<tr><td>" & FullNameOfCourse & " </td></tr>"
) & "
</table>"

You can use the Distinct function to retrieve only the unique values for the FullNameOfCourse column in your filtered expression:

"<table width='100%' border='1' cellpadding='5' style='border:1px solid black; border-collapse:collapse'>" & "<tr style='background-color:#efefef' >
<td> Course Name </td>
</tr>" &
Concat(
    Sort(
        Distinct(
            Filter(MyTempCol2, Full_Name in ([@PowerBIIntegration]).Data.Full_Name),
            FullNameOfCourse),
        Result),
    "<tr><td>" & Result & "</td></tr>"
) & "
</table>"

 Hope this helps!

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (4,413)