Forum Discussion
Multiple operation on matrix cell
Hello Anonymous Thank you for your reply.
I was able to do what I have mentioned in little different way, but some how basic arithmetic calculation done by DAX function is not giving correct value. Let me explain.
I have transformed my matrix (mentioned in the problem) as a table which looks something like this:
Column expcol,powercol,finalexpcol are different measure which I am using and looks like following:
expcol = DIVIDE((cross_tab_file[ROW_TOTAL]*cross_tab_file[COL_TOAL]),cross_tab_file[GRAND_TOTAL]) powercol = POWER(ABS(cross_tab_file[COUNT]-cross_tab_file[expcol]),2) finalexpcol = DIVIDE(cross_tab_file[powercol],cross_tab_file[expcol])
However the calculation which are done by DAX is not matching with actual calculator.
Consider 1st row in the image
expcol should be (40*29)/113 which in calculator gives 10.2654867257 while DAX result is 10.266719118...
Further powercol should be (Mod(9-10.266719118))^2 which again in calculator gives as 1.60457732391 while in DAX returns as 1.18915639..
Again finalexpcol should be 1.18915639/10.266719118 which in calcultor is 0.11582632935 and in DAX is 0.177456..
Am i doing something wrong?? Any pointer would be very helpful.
Thanks