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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Active Discussion

Filtering on a List page with PowerBI Factbox in v16.x on-premise

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello all,

Currently, we have a known issue in v16.x (on-premises only) where filtering on a List page does not update the PowerBI Report Factbox correctly i.e. the filtering is broken. The team is investigating the underlying cause, but you can apply the following workaround in the meantime.

Your custom PowerBI Reports remains the same, (just make sure the Primary Key is in the “Filter on all pages” section).
The workaround is in the AL code and you will have to add the following code in triggers OnAfterGetCurrRecord() and OnOpenPage().

Below is a sample of a page extension for Items List:

0572.ExtensionCode.jpg

Once you publish the page extension successfully, on the Items page select your PowerBI Report in the Factbox and the filtering should work again:

PBI1.png

PBI2.png


“Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability or fitness for a particular purpose. This mail message assumes that you are familiar with the programming language that is being demonstrated and the tools that are used to create and debug procedures.”

*This post is locked for comments

  • Mohamad Vajid Profile Picture
    Microsoft Employee on at

    Here is the sample extension code:

    pageextension 50100 ItemListExt extends "Item List"
    {
        layout
        {
            addfirst(FactBoxes)
            {
                part("Item List"; "Power BI Report FactBox")
                {
                    ApplicationArea = All;
                }
            }
        }
    
        trigger OnAfterGetCurrRecord()
        begin
            CurrPage."Item List".PAGE.SetCurrentListSelection(
                "No.", // This is the value to set the filter to (OnAfterGetCurrRecord is called every time a different record is selected)
                false, // This represents whether the value in the line above is an integer or not. For example, in this case it is a Code, which is not an integer.
                true // This represents whether the factbox is visible or not and is used only for optimization. I suggest always passing true here.
                );
        end;
    
        trigger OnOpenPage()
        var
            FactBoxVisible: Boolean;
        begin
            CurrPage."Item List".PAGE.InitFactBox(
                CurrPage.ObjectId(false)   '_custom', // This is what we call "Context". Factboxes loaded with the same Context will show the same reports. This allows 1) to show the same set of reports in different pages, or 2) to show two different sets of reports in the same page.
                CurrPage.Caption, // This is the filter applied when the user chooses the action "Select Reports". Leave it empty to show all reports.
                FactBoxVisible // FactBoxVisible returns whether the factbox has been previously hidden by using: CurrPage.MyCustomPowerBIPart.PAGE.SetFactBoxVisibility(PowerBIVisible); This is a feature that we will soon deprecate, so I suggess to just always pass true here.
                );
        end;
    }
    
    

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

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,821 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,122 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 959 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans