Forum Discussion

AlexFielding's avatar
AlexFielding
Regular Visitor
4 years ago

Measure Calculating Incorrectly when selected in DAX table

Hi All,

 

I have an issue with the measures in table 1 that I have selected in a DAX table, where on certain records they are calculating marginally different values. See below table structure: 

Table 1: 

 Row IDValue 1 Start MonthMonth 1 ValueMonth 2 ValueMonth 1 Measure A Month 2 Measure AMonth 1 Measure BMonth 2 Measure BMonth 1 Measure CMonth 2 Measure C
FormulaID InputInputInputInput(Month 1 Value/Value 1)*(Table 2 Measure)(Month 2 Value/Value 2)*(Table 2 Measure)Month 1 Value - Month 1 Measure AMonth 2 Value - Month 2 Measure AEDATE(startmonth,0)EDATE(startmonth,1)

 

Table 2:

Table 2 Measure
Sum of values from related tables

 

I have created a dax table as below:

 

 

 

 

 

 

 

DAX = 
    UNION(
            SELECTCOLUMNS('Table1',"Type","Revenue","ID",[Row ID],"Start Month",
            [Start Month],"Month 1",[Month 1 Value],"Month 2",[Month 2 Value]),
            
            SELECTCOLUMNS('Table1',"Type","Forecast cost","ID",[Row ID],"Start Month",[Start 
            Month],"Month 1",[Month 1 Measure A],"Month 2",[Month 2 Measure A]),
            
            SELECTCOLUMNS('Table1',"Type","Net","ID",[Row ID],"Start Month",[Start 
            Month],"Month 1",[Month 1 Measure B],"Month 2",[Month 2 Measure B]),
            
            SELECTCOLUMNS('Table1',"Type","Month","ID",[Row ID],"Start Month",[Start 
            Month],"Month 1",[Month 1 Measure C],"Month 2",[Month 2 Measure C])
    )

 

 

 

 

 

 

 

 

The DAX table splits the single row into 4, so that I can stack the values in a matrix by month.

 

When I put the values from the source tables onto the report, all the calculations are correct.

 

The issue is with Measure A in the DAX table - sometimes it returns the correct values, and sometimes it is out by anywhere from 0.07%-10%.

 

Can anyone suggest what I'm doing wrong?

 

Thankyou in advance!

2 Replies