Hi All I am confused about two DAX formulas that works very closely when Calculating Average Warehouse Sales. I have Sales Table and Date Table. In Sales table I have Warehouse Code ,Unit Price, Order Quantity, Order Date, Total Revenue( Unit price * Order quantity) and so on…
Date Table is connected to Sales Table ( one to many relationship)
Total Sales (Measure) = SUM( Sales[Total Revenue])
I want to calculate date wise Average Warehouse Sales
-
= AVERAGEX(VALUES[Sales(Warehouse Code)], [Total Sales])
-
= CALCULATE(AVERAGE([Total Sales], VALUES[Sales(Warehouse Code)])
Which one is correct and why? both are giving same result on some dates and on some dates its different. Please any one explain briefly
Second formula how it works? which results it gives?