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

The Fabric community is upgrading! Read all of the details including the timeline and what you can expect. Learn more

Reply
abacus2017
Regular Visitor

xlrellogop.cpp

I am receiving an error:

      An unexpected error occurred (file 'xlrellogop.cpp', line 3128, function 'XLLogOp_SPJ<class XLScaLogOp>::ExecSpool')

 

It happens in any of several (but not all) measures that:

  • reference another measure in a VAR assignment
  • the main measure is used in a Table visualization
    • same measure works fine in a Card visualization on the same page
    • same measure works fine in DAX Studio

Here is the general pattern.  Main measure starts out like this pseudo code:

 

RWB: =

                row("foo1", switch(true()

                                             , [very expensive measure] = 0, "red"

                                             , [very expensive measure] = 1, "white"

                                             , [very expensive measure] = 2, "blue"

                                             )

                        )

 

 Assume this measure works just fine.  Reference it in a Power BI 'Table', in a 'Card', either works fine.

 But wait a minute!  We could end up calling the [very expensive measure] 3 times...why not use a VAR?

 


RWB: =

                var VEM = [very expensive measure] 

 return

                row("foo1", switch(true()

                                             , VEM = 0, "red"

                                             , VEM = 1, "white"

                                             , VEM = 2, "blue"

                                             )

                        )

It runs much faster now in DAX Studio!  Let's deploy it to the SSAS Datatabase.  Let's refresh the Power BI document.  The Card that refers to [RWB] works.  Table that refers to [RWB] has a big X on it.  Details shows:

 

  An unexpected error occurred (file 'xlrellogop.cpp', line 3128, function 'XLLogOp_SPJ<class XLScaLogOp>::ExecSpool')

 

I have to go back to the slow version - with redundant calls to [very expensive measure] - to get the page working again.

 

Thoughts?

2 REPLIES 2
PatSz
Frequent Visitor

Encounter the same error statement in several reports. It seems like it is an ad hoc without a clear pattern.
For example I have a table visual with three measures. When I add measures to the table visual in specific order everything works fine.
In case I change the order measures are added to the visual an error occure.

Have fun with me and take a look on screens attached :).Visual with an errorVisual with an errorVisual without an errorVisual without an error

 

 

v-caliao-msft
Microsoft Employee
Microsoft Employee

@abacus2017,

 

I have tested it on my local environment, we cannot reproduce this issue. So could you please provide us some sample data and the steps to reproduce this issue, so that we can make further analysis.

 

Regards,

Charlie Liao

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.