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

Notifications

Announcements

Community site session details

Community site session details

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

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

(0) ShareShare
ReportReport
Posted on by

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

I have the same question (0)
  • Mohamad Vajid Profile Picture
    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

News and Announcements

Season of Giving Solutions is Here!

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,594

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,594

#3
YUN ZHU Profile Picture

YUN ZHU 748 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans