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 / Power Apps Lookup Fiel...
Power Apps
Answered

Power Apps Lookup Field Not Working in Filter

(0) ShareShare
ReportReport
Posted on by 9

I'm building a Canvas App using Dataverse. I have a Weekly Submissions table that includes a lookup field to the Employee table. The lookup field is named Employee, and its logical name is dard_EmployeeID.

In my app, I’m trying to count how many plans an employee has submitted this month using the following formula:

Set(varPlansThisMonth,
CountRows(
Filter('Weekly Submissions',
dard_EmployeeID.dard_EmployeeId = varCurrentEmployee.dard_EmployeeId &&
Month(dard_StartDate) = Month(Today()) &&
Year(dard_StartDate) = Year(Today())
)
)
);

Issue

dard_EmployeeID is not being recognized in the formula.

Intellisense doesn’t auto-complete it.

I've confirmed the column exists in Dataverse and is correctly configured as a lookup to Employee.

The related data source is connected and refreshed in Power Apps.

What I’ve Tried

Used the exact logical name dard_EmployeeID.

Tried accessing the .Id or .dard_EmployeeId values.

Refreshed the data sources in Power Apps.

Confirmed that the column is visible in the table schema.

What I Need Help With

  • How to properly reference a lookup field (dard_EmployeeID) in a Filter expression in Canvas Apps.

  • Why the lookup field might not be appearing in IntelliSense or causing formula errors.

  • Thanks in advance for your help.


error.png

Your file is currently under scan for potential threats. Please wait while we review it for any viruses or malicious content.

Categories:
I have the same question (1)
  • LowCodeJim Profile Picture
    314 Moderator on at
     
    I don't think you need the schema name in the canvas app. The below formula worked for me:
    CountRows(
        Filter(
            'Weekly Submissions',
            Employee.'Employee (cr862_employeeid)' = Gallery1.Selected.'Employee (cr862_employeeid)'
        )
    )
    Where "Employee" is the column name (display name) in the weekly submission table and "Employee (cr862_employeeid)" is the unique identifier column of the employee table, and then in my quick test I was just using a gallery of employees to get the employeeid to filter by.
     
    Hope that helps!
     
  • Kalathiya Profile Picture
    2,163 Super User 2026 Season 1 on at
    Hello @SN-18010819-0
     
    Your code already looks good. I believe the lookup column you are using might be incorrect. Could you please confirm?
    Set(varPlansThisMonth,
    CountRows(
    		Filter('Weekly Submissions', //dard_EmployeeID - Replace this with your lookup column name from Weekly Submission table
    			dard_EmployeeID.dard_EmployeeId = varCurrentEmployee.dard_EmployeeId &&
    			Month(dard_StartDate) = Month(Today()) &&
    			Year(dard_StartDate) = Year(Today())
    		)
    	)
    );
    Note:  dard_EmployeeID - Replace this with your lookup column name from Weekly Submission table. 
     
    If still doesn't work, Could you please share the screenshot of your table and lookup column.
     
    If this response resolves your issue, please mark it as the Verified Answer so it can help other community members as well.
    ---------------------------------------------------------------------------------
     
    📩 Need more help? Mention @Kalathiya anytime!
    ✔️ Don’t forget to Accept as Solution if this guidance worked for you.
    💛 Your Like motivates me to keep helping!
  • ndloovusphe Profile Picture
    9 on at
     
  • ndloovusphe Profile Picture
    9 on at
    // Set current employee from the Employees table using email
    Set(
        varCurrentEmployee,
        LookUp(Employees, dard_emp_email = User().Email)
    );
     
    // Ensure employee was found before proceeding
    If(
        !IsBlank(varCurrentEmployee),
     
        // Count total plans this month for this employee
        Set(
            varPlansThisMonth,
            CountRows(
                Filter(
                    'Weekly Submissions',
                    Employee.'Employee (dard_employeeid)' = varCurrentEmployee.'Employee (dard_employeeid)' &&
                    Month(dard_StartDate) = Month(Today()) &&
                    Year(dard_StartDate) = Year(Today())
                )
            )
        );
     
        // Count approved plans
        Set(
            varApprovedPlans,
            CountRows(
                Filter(
                    'Weekly Submissions',
                    Employee.'Employee (dard_employeeid)' = varCurrentEmployee.'Employee (dard_employeeid)' &&
                    dard_Submissionstatus = "Approved"
                )
            )
        );
     
        // Count pending approvals where current user is the assigned manager
        Set(
            varPendingApprovals,
            CountRows(
                Filter(
                    'Weekly Submissions',
                    'Assigned manager'.'Employee (dard_employeeid)' = varCurrentEmployee.'Employee (dard_employeeid)' &&
                    dard_Submissionstatus in ["Pending", "Awaiting Review"]
                )
            )
        )
    );
  • Verified answer
    Kalathiya Profile Picture
    2,163 Super User 2026 Season 1 on at
    Hello @ndloovusphe
     
    Please try below code: 
    Set(varPlansThisMonth,
    CountRows(
    		Filter('Weekly Submissions', //dard_EmployeeID - Replace this with your lookup column name from Weekly Submission table
    			dard_EmployeeID.dard_emp_email = varCurrentEmployee.dard_emp_email &&
    			Month(dard_StartDate) = Month(Today()) &&
    			Year(dard_StartDate) = Year(Today())
    		)
    	)
    );
    
    

    In the filter condition:

    dard_EmployeeID.dard_emp_email

    dard_EmployeeID is the lookup column in the Weekly Submissions table

    dard_emp_email is the column from the related Employee table

     
    If you are getting an error, please share a screenshot of the error along with screenshots of the table and column details. This will help us troubleshoot the issue.
     
     
    If this response resolves your issue, please mark it as the Verified Answer so it can help other community members as well.
     
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 842

#2
Valantis Profile Picture

Valantis 563

#3
Haque Profile Picture

Haque 402

Last 30 days Overall leaderboard