Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
AlexFielding
Regular Visitor

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 2
v-kkf-msft
Community Support
Community Support

Hi @AlexFielding ,

 

Could you please share your PBIX file or sample data?

 

Best Regards,
Winniz

lbendlin
Super User
Super User

Please provide sanitized sample data that fully covers your issue. If you paste the data into a table in your post or use one of the file services it will be easier to assist you. Avoid posting screenshots of your source data if possible.

Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

Find out what's new and trending in the Fabric Community.