web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filter a Data Source b...
Power Apps
Unanswered

Filter a Data Source based on Second Data Source Condition

(0) ShareShare
ReportReport
Posted on by 10

Hi All,

 

I have an app that displays items from PowerBI in my gallery with a filter for just the selected quarter. Users can then go in and write a comment for each item in the gallery which then gets saved to SharePoint in a column called "Comment". 

 

What I am trying to do is filter my gallery which currently displays the code below to only show items where Comment is not blank.

 

Filter(
 PowerBIIntegration.Data,
 'Quarter Year' = 'Selected Quarter'
 )

 

 

When users submit a comment, I create a unique ID for each submitted comment that concatenates all the columns that make that row unique. Do I have to also create an ID for the Power BI columns I am pulling in? I am struggling to find a way to filter my gallery which is connected to Data source 1 based on a condition in Data source 2.

 

Any help would be greatly appreciated!

Categories:
I have the same question (0)
  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @klinha ,

     

    If there is any unique column in Power BI dataset, you can concatenate it a value of this column with a special separator like "|" at the very front of comments. When selecting an entry in SharePoint, use Split function to save this value into a variable:

    Set(varUniqueValue, First(Split(SharePointComments.Selected.Comments, "|").Result)

     

    Then filter can use this variable as its criteria:

    Filter(
     PowerBIIntegration.Data,
     UniqueColumn = varUniqueValue
    )

     

    Best regards,

  • klinha Profile Picture
    10 on at

    If I do not have a unique column coming from Power BI dataset - is there a way I can do this in Power Apps without having to create an additional column in PowerBI? 

  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @klinha ,

     

    You can do it as above mentioned, but the results will be multiple entries. So, if you can handle it and find the record you want, it's OK to go with it.

     

    Best regards,

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 463

#2
WarrenBelz Profile Picture

WarrenBelz 364 Most Valuable Professional

#3
11manish Profile Picture

11manish 275

Last 30 days Overall leaderboard