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 :
Power Platform Community / Forums / Power Automate / Power BI: Run a query ...
Power Automate
Unanswered

Power BI: Run a query against a dataset - DatasetExecuteQueriesError 'Cannot find table'

(0) ShareShare
ReportReport
Posted on by
Greetings,
Can a Power Automate step Power BI: Run a query against a Dataset execute a Power BI Summarized table?
 
Note, the Power Automate flow step moves to the next step If the Query is switched to an import table. 
 
I have as Power BI Report that is using as Power Automate visual to execute a flow.   
Upon execution of the flow, the following error message is received:
 
{"error":{"code":"DatasetExecuteQueriesError","pbi.error":{"code":"DatasetExecuteQueriesError","parameters":{},"details":[{"code":"DetailsMessage","detail":{"type":1,"value":"Query (25, 38) Cannot find table '<oii>Annual SalesForecast SnapShot</oii>'."}},{"code":"AnalysisServicesErrorCode","detail":{"type":1,"value":"3241803779"}}]}}}
 
The Power BI table is a Summarized table defined as:
 
Annual SalesForecast SnapShot =
ADDCOLUMNS(
    SUMMARIZECOLUMNS(
        'DateTable'[Year],
        'DateTable'[Quarter],
        'DateTable'[Month],
        'Customers'[Customer Group TT],
        'Item'[Part Family],
        FILTER(
            'DateTable',
            'DateTable'[Year] = YEAR(TODAY())+1
        )
    ),
    "Full Forecast", 'Measure Table'[Customer Forecast + New Business],
    "SnapShot Date", FORMAT(TODAY(),"MM/DD/YYYY")
)
 
With Power Automare, the Power BI: Run a query against a dataset, is defined as:
 
DEFINE
    VAR __DS0FilterTable = 
        TREATAS(
            {"'Measure Table'[Customer Forecast + New Business]"},
            'Full Forecast'[Full Forecast Fields]
        )
    VAR __DS0FilterTable2 = 
        TREATAS({2025}, 'DateTable'[Year])
    VAR __DS0Core = 
        SUMMARIZECOLUMNS(
            ROLLUPADDISSUBTOTAL(
                ROLLUPGROUP(
                    'Annual SalesForecast SnapShot'[Customer Group TT],
                    'Annual SalesForecast SnapShot'[Part Family],
                    'Annual SalesForecast SnapShot'[Year],
                    'Annual SalesForecast SnapShot'[Quarter],
                    'Annual SalesForecast SnapShot'[Month],
                    'Annual SalesForecast SnapShot'[SnapShot Date]
                ), "IsGrandTotalRowTotal"
            ),
            __DS0FilterTable,
            __DS0FilterTable2,
            "SumFull_Forecast", CALCULATE(SUM('Annual SalesForecast SnapShot'[Full Forecast]))
        )
    VAR __DS0PrimaryWindowed = 
        TOPN(
            502,
            __DS0Core,
            [IsGrandTotalRowTotal],
            0,
            [SumFull_Forecast],
            0,
            'Annual SalesForecast SnapShot'[Customer Group TT],
            1,
            'Annual SalesForecast SnapShot'[Part Family],
            1,
            'Annual SalesForecast SnapShot'[Year],
            1,
            'Annual SalesForecast SnapShot'[Quarter],
            1,
            'Annual SalesForecast SnapShot'[Month],
            1,
            'Annual SalesForecast SnapShot'[SnapShot Date],
            1
        )
EVALUATE
    __DS0PrimaryWindowed
 
Categories:
I have the same question (0)
  • lbendlin Profile Picture
    8,474 Super User 2025 Season 2 on at
    When you run a DAX query from Power Automate you want to run it in its simplest form.  Use a Table Visual (not matrix !!!) , with no row totals. 
     
    Do a test run 
     
    EVALUATE TOPN(100,'​​​​​​​Annual SalesForecast SnapShot')
     
    and then add your aggregations and filters as needed.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard