Strings and single quotes

When programming in DAX you can use both double quotes ” and single quotes ‘ to contain strings. You must use double quotes when using labels, but aside from that, functionally they work the same.

One consideration is the best practices. Personally I use compile level 4, which will flag up unused variables and lots of useful information to keep your code clean, but it also flags up strings that are not labels. This is often a problem with data migration scripts as you will often use strings, but wont want to create DAX labels for them. You also don’t want the best practice engine from flagging them up, so the best course of action is to use single quotes to contain the strings as this will not cause a best practice warning.

If when using single quotes and you want to include a single quote within the string, you need to ensure you use \’ where you want the single quote, as this will be interrupted as a single quote within a string.

Transfer Orders and Pallets (AX2009 and AX2012)

When you create a transfer order in AX2012 or AX2009, and using Pallet Id’s, the system does not include the pallet number on the receiving warehouse. This means you need to create a new pallet and re-process everything on the pallet as part of the receiving process.

I have found that a number of customers want to keep the pallet number and the contents the same.

Continue reading

Index field order – pre AX 2012

In a previous blog I talked about adding additional fields to your indexes in DAX to control the placement of the DataAreaId. This was in relation to AX2012, but did you know you can also do this in previous versions of AX, this has been verified as working on version 4 and 2009.

This can greatly improve the performance of queries and should be considered in your performance tuning tool kit. But as with all things related to performance tuning, remember to test thoroughly before implementing on a production environment.

Financial Dimension upgrading from AX4/AX2009 to AX2012 R2/R3

When your current AX4 or AX2009 environment has more than 5 financial dimensions, you need to ensure you setup the AX2012 system so the existing data can map over to the new system.

There are eight extended data types that need to be changed in AX2012 to ensure the field mappings correctly configure to transfer the data between systems as part of an upgrade. These extended data types are: DEL_COSAllowDimensions, Dimension, DimensionAllocation, DimensionCriteria, DimensionKeepFromTransaction, DimensionPriorit, MandatoryDimension and XMLMapDimension.

For each of the extended data types you need to add the necessary Array Elements to ensure they cover the number of financial dimensions contained in the source system. The naming and labeling of the dimensions is not important as these fields are not used with the standard AX 2012 dimension structure, this is just for the purpose of upgrading the data from the earlier versions.