QGIS saves its coordinate systems in a database. In cases like EPSG:3003, it keeps several possible transformations but one by default. In the Settings > Options, you can tell QGIS to ask you which transformation to use instead of using the default transformation, or tell which is the default transformation you want to be used when reprojecting between two coordinate systems.
All datum transformations are performed with the WGS84 datum as an intermediary, so you could choose a transformation of the source system to WGS84 and another transformation of WGS84 to the destination system. The Helmert parameters of the
+towgs84 option of the PROJ4 chain work both directly and inversely.
The options are then two: tell QGIS which are the preferred datum when reprojecting between those coordinate systems, or create a new system with the desired datum, and calculate coordinates towards that system. I do not know which is the best option for the
transform function, but let's see both.
In Settings > Options, add a default datum, select source and destination CRS, select the desired datum and accept.
The origin CRS do not have different datum to choose from, you just have to choose between the destination options. The Options-CRS should look like this:
You could test if the
transform function takes this global indication into account. Or create a new CRS.
In Settings > Custom Projections, add a new CRS, give it a name and write the string PROJ4 such as the EPSG:3003 but with the desired
Once added, the new CRS is saved in the database of custom systems and a very high USER number is granted. You can find it among the systems available for your project:
Finally, rewrite the expression:
x( transform( $geometry, 'EPSG:32632', 'USER:100047' ) )