cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

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
Highlighted
Power Apps
Power Apps

Re: How to get distinct values in a html text?

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
Highlighted
Super User
Super User

Re: How to get distinct values in a html text?

@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."

Highlighted
Helper II
Helper II

Re: How to get distinct values in a html text?

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>"

Highlighted
Power Apps
Power Apps

Re: How to get distinct values in a html text?

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

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (5,388)