The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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
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 🙂
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?