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 / How to set default gal...
Power Apps
Answered

How to set default gallery item values before filtering

(0) ShareShare
ReportReport
Posted on by 265

Hi,

I have a collection as below.

ClearCollect(colOPDBalanceHistory,SPOPDBalanceHistory); //SPOPDBalanceHistory is SP list
 
I added some columns from another data source also.
ClearCollect(
    colUsageHistorySummery,
    AddColumns(
        colOPDBalanceHistory,
        "Employee_Name",LookUp(colSPEmployee,EmployeeID=colOPDBalanceHistory[@EmployeeID],EmployeeName),
        "_Grade",LookUp(colSPEmployee,EmployeeID=colOPDBalanceHistory[@EmployeeID],Grade),
        "_OPDCategory",LookUp(colSPEmployee,EmployeeID=colOPDBalanceHistory[@EmployeeID],OPDCategory.Value)
        )
        );
Gallery View
PeriodFromPeriodToEmpNameGradeOPD CategoryAllocated AmountUtilized AmountBalance Amount
        
        

 

Now I want to set the default gallery item for current Period from and Current Period To …..I have coded for filtering from Period From/Period To/OPD Category. There is no matter. But I couldn't set default gallery items. How I do it? Is there any easy way?

 

Thanks

Categories:
I have the same question (0)
  • Verified answer
    Rajkumar_M Profile Picture
    3,747 Moderator on at

    Hi @Erandi 

     

    Try this,

     

    Default = First(
    Filter(
    colUsageHistorySummery,
    PeriodFrom <= Today() && PeriodTo >= Today()
    )
    )

     

    Thanks!

     

    If my response has been helpful in resolving your issue, I kindly request that you consider clicking "Accept as solution" and "giving it a thumbs up" as a token of appreciation.

     

  • Erandi Profile Picture
    265 on at

    Thanks @Rajkumar_404  I will try this solution

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 342 Most Valuable Professional

#2
11manish Profile Picture

11manish 234

#3
Valantis Profile Picture

Valantis 187

Last 30 days Overall leaderboard