Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
nok
Advocate II
Advocate II

Transform Performance Analyzer query into a new table

Hello!

I have a visual table that contains 15 columns coming from 4 different related tables and with different filters applied in my dashboard page. I want to replicate this visual table with exactly the same data shown, but in a PBI table.

To do this, I went to the Performance Analyzer tab and copied the query from my visual table. However, when I go to "Create new table" and paste this query, PBI shows me errors in the code. How can I use this query to create a new table in my PBI with the same data as the visual table?

This is the query for my visual table:

// DAX Query
DEFINE
    VAR __DS0FilterTable =
        FILTER(
            KEEPFILTERS(VALUES('BL'[Source])),
            NOT(
                'BL'[Source] IN {"aaa",
                    "bbb",
                    "ccc"}
            )
        )

    VAR __DS0FilterTable2 =
        TREATAS({"BotL"}, 'BL'[Type])

    VAR __DS0FilterTable3 =
        TREATAS({"TAS",
            "MyProc"}, 'BL'[Local])

    VAR __DS0FilterTable4 =
        TREATAS({2024}, 'Calendar'[Year])

    VAR __DS0Core =
        SUMMARIZECOLUMNS(
            ROLLUPADDISSUBTOTAL(
                ROLLUPGROUP(
                    'Calendar'[MonRef],
                    'BL'[Evo],
                    'BL'[Local],
                    'BL'[Source],
                    'BL'[PO],
                    'BL'[Id],
                    'BL'[X-ID],
                    'BL'[Name],
                    'BL'[Status],
                    'BL'[O Status],
                    'ACR'[UB]
                ), "RowTotal"
            ),
            __DS0FilterTable,
            __DS0FilterTable2,
            __DS0FilterTable3,
            __DS0FilterTable4,
            "YTD", 'A_Measures'[YTD],
            "LD", 'A_Measures'[L D],
            "YTD_Dynamic_Forecast", 'A_Measures'[YTD_Dynamic_Forecast],
            "SUMUB", IGNORE(CALCULATE(SUM('ACR'[%_UB])))
        )

    VAR __DS0PrimaryWindowed =
        TOPN(
            502,
            __DS0Core,
            [RowTotal],
            0,
            'BL'[Name],
            1,
            'Calendar'[MonRef],
            1,
            'BL'[Evo],
            1,
            'BL'[Local],
            1,
            'BL'[Source],
            1,
            'BL'[PO],
            1,
            'BL'[Id],
            1,
            'BL'[X-ID],
            1,
            'BL'[O Status],
            1,
            'BL'[Status],
            1,
            'ACR'[UB],
            1
        )

EVALUATE
    __DS0PrimaryWindowed

ORDER BY
    [RowTotal] DESC,
    'BL'[Name],
    'Calendar'[MonRef],
    'BL'[Evo],
    'BL'[Local],
    'BL'[Source],
    'BL'[PO],
    'BL'[Id],
    'BL'[X-ID],
    'BL'[O Status],
    'BL'[Status],
    'ACR'[UB]
1 REPLY 1
foodd
Super User
Super User

Hello @nok, and thank you for sharing a question with the Community.  Please remember to adhere to the decorum of the Community Forum when asking a question.

Please provide your work-in-progress Power BI Desktop file (with sensitive information removed) that covers your issue or question completely in a usable format (not as a screenshot). You can upload the PBIX file to a cloud storage service such as OneDrive, Google Drive, Dropbox, or to a Github repository, and then share a file’s URL.

https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

This allows members of the Forum to assess the state of the model, report layer, relationships, and any DAX applied.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.