ALLEXCEPT ERROR

 Dear All

Error occured in my calculated column when I added ALLEXPECT part at the end.

The model and error text is on the screen below.

I am using Excel 2013 64bit

Whats wrong with this? How a correct formula should look like?


=CALCULATE(IF([Spread No.]=MIN([Spread No.]);"Front Cover";IF([Spread No.]=MAX([Spread No.]);"Back Cover";IF([Spread No.]<(MIN([Spread No.])+MAX([Spread No.])/14);"Lead Front";IF([Spread No.]>(Max([Spread No.])-MAX([Spread No.])/14)-1;"Lead Back";IF([Spread No.]=(MAX([Spread No.])/2);"Central Spread";"Others")))));ALLEXCEPT(Table1;Table1[Offer Campaign Year];Table1[Offer Campaign No.]))

September 10th, 2015 7:49am

The first thing to try would be to make sure you always include the table reference when naming a column.

You can get away without it sometimes but some functions require it.

Either way, its a good habit to get into and it's considered a best practice that makes your DAX much easier to follow.

Calculated Columns should always have a table reference.

Measures/Calculated Fields should not reference the table where they are stored.

Calculated Columns should follow these patterns:

Table1[Spread No.]

'Table1'[Spread No.]

'Table 1'[Spread No.]

Notice the single quotes are only required if there is a space in the table name.

Measures should just be referenced with square brackets [] with there are spaces or not:

[Measure Name]
Try updating all those column references and if you still get errors, reply to this thread.

Free Windows Admin Tool Kit Click here and download it now
September 10th, 2015 4:38pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics