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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

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