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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
benfedit
Advocate I
Advocate I

New composite model - DAX help - calculation cost * countrows()

hi all,

 

I'm using the new feature "direct query for power bi and azure analysis services".

My data sources are as follows:

 

Fact table (800M rows) (azure analyisis services)

 -Excel_Key (Calculated column)

Excel Table (20k rows) (Excel imported)

 - Key (calculated column)

 - cost

 

There is a on to many relation ship from Excel table to the fact table.

The columns used to link the two tables are both calculated columns (combinevalues(";"col1,col2,col3)

 

What I would like to ahcieve is sometijg like this:

total cost= Cost * countrows(Fact)

 

What ever I tried so far gives me either wrong total or an "unexpected error".

 

1) I tired to bring the cost column to my fact table using related but does not seem to work with the composite model.

2) I tried the sumx approach (which works perfectly fine on an usual tabular model) but I get the following error : "An unexpected error occurred (file 'xldqas.cpp', line 510, function 'DAXDefManager-AddVariableOrlnlineExpr')"

 

Any thoughts?

 

thanks

1 ACCEPTED SOLUTION


Hi  Amitchandak,

 

Thanks for the suggestion.

So I seem to have found the "solution" which is more like a work around but doesn't really matter as the whole project is already a workaround 🙂

 

So it seems that with the new composite model sumx works fine only and only when you don't put columns from the dim into the visual.

As soon as you add any columns of the dim into the visual with the sumx measure it throws an error "An unexpected error occurred (file 'xldqas.cpp', line 510, function 'DAXDefManager-..."

 

I gess Microsoft will fix it at some point we're only about a month since the release of this new massive feature so can't complain at all 🙂

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

I am having the same issue and error. Composite model (Power BI Dataset Direct Query + Other Tables Import)

jake-BIVisualiz_0-1613102933466.png


If I open up DAX STUDIO the measure runs fine but for whatever reason, the Visual in Power BI Desktop cannot display.



Hi Jake,

 

So I'm not alone in having this issue...

The only workaround that seems to work so far at least for me and Nexter is to make sure that you do not bring the column from the import table into your visual and that should do the trick.

I'm sure that it willget fixed soon but for now we have to take this into consideration while designing our models and using the new composite feature.

amitchandak
Super User
Super User

@benfedit , One is a column and one is the measure. What are trying a new column or new measure

 

Measure using a common dim

total cost= Sumx(Values(Dim[dim]) , Min([Cost]) * countrows(Fact))

 

a new column, but that will work when both tables are import mode

total cost= Cost * countrows(Fact)


Hi  Amitchandak,

 

Thanks for the suggestion.

So I seem to have found the "solution" which is more like a work around but doesn't really matter as the whole project is already a workaround 🙂

 

So it seems that with the new composite model sumx works fine only and only when you don't put columns from the dim into the visual.

As soon as you add any columns of the dim into the visual with the sumx measure it throws an error "An unexpected error occurred (file 'xldqas.cpp', line 510, function 'DAXDefManager-..."

 

I gess Microsoft will fix it at some point we're only about a month since the release of this new massive feature so can't complain at all 🙂

I'm having this same issue right now, thanks for bringing it up!!  I'm trying to use averagex, it works when shown as an aggregated number, but the second I try to bring in the columns from dimension table in the composite model it gives me that same error.  

In the meantime, I've been able to get around it be avoiding the averagex and simply dividing the measure by a count of the dimension table rows, although this gives slightly different numbers in the aggregate, but I'll look into that.  

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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