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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
Regular 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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.