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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Slowik131
Helper I
Helper I

Issue with referencing a measure in column creation in dual table

Hi,

 

when I migrated my model to aggregated dataset, I set up my calendar in dual mode. When I tried to replicate the calculated column which was there previously, I got this message: An unexpected error occurred (file 'tmmdmodeltm.cpp', line 2328, function 'MDModelTM::ResolveIMBIC)

Column which I tried to create looks like this

flag_min_Global = 

IF('Calendar'[Dates] <= [MIN last loading date Global], TRUE(), FALSE()) 

code for the measure from above:

MIN last loading date global = 
VAR date_afrique = CALCULATE(MAX('Daily Portfolio'[dat_maj_pht]), Origin[ID Zone] = 5)
VAR date_caraibes = CALCULATE(MAX('Daily Portfolio'[dat_maj_pht]), Origin[ID Zone] = 1)
RETURN MIN(date_afrique, date_caraibes)

 

I use this as a flag in my calculate functions to show only available data across different areas. So i.e. if the data for Afrique is available today, but the data for Caraibes is up until yesterday, I always show data for everything up until yesterday.

 

Do you know how to fix it or what can be the workaround?

 

Thanks

3 REPLIES 3
HotChilli
Super User
Super User

That's a runtime error.  You might want to log that as a bug

https://community.fabric.microsoft.com/t5/Issues/idb-p/Issues 

and you might get a better response than mine.

As a workaround, I think you should rewrite the column DAX so it doesn't use a measure.  This is not a good idea anyway (Columns for data, measures for visuals)

I have no idea if this will work but it might move you on a bit

I did try to rewrite the dax for the column, however calculated columns do not accept filter arguments, and that's what I need here - to calcualte max date per area and pick the min between them. I tried also to make it as an addition to a measure, both as a FILTER() value and with a virtual table. None of it worked. Hence I stay with the flag column.

 

Thanks though, I'll report it 🙂

Slowik131
Helper I
Helper I

As a workaround I created a seperate calendar in import mode on which I created a desired column. This new calendar filters the one which is in dual mode and everything works.

 

Besides that, does anyone have any idea how to do it another way?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.