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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

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

Anonymous
Not applicable

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 🙂

Anonymous
Not applicable

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
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.

Top Solution Authors