The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi Guys ,
Here i trying to find the variance each of the line items it is matching exactly but the total of that it is not matching at all ,Can anybody help me to sort it out .
I have AOP, City, Item, COGS , Dim Date Tables ,
Here I'm Trying to get the variance for the COGS between Actual and AOP based on the City ,Item and Month and Year.
Table Structure
AOP
City
COGS
Dim Date
Item
Relationship
Measure Used for
Solved! Go to Solution.
@ganesanr1002
Seems that in the table visual, you have placed the date column from the AOP table this is why you have wrong values for the Actual Price (which apparently you did not notice). You need to use the date column only from the date table as it filters both fact tables.
Variance =
SUMX (
CROSSJOIN (
CROSSJOIN ( VALUES ( 'Item'[Item Name] ), VALUES ( City[City] ) ),
VALUES ( 'Dim Date'[Date] )
),
[Avg AOP Price] - [Actual Price]
)
please try
Variance =
SUMX (
CROSSJOIN (
CROSSJOIN ( VALUES ( Item[Item Nsme] ), VALUES ( City[City] ) ),
VALUES ( 'Dim Date'[Date] )
),
[Avg AOP Price] - [Actual Price]
)
@ganesanr1002
Seems that in the table visual, you have placed the date column from the AOP table this is why you have wrong values for the Actual Price (which apparently you did not notice). You need to use the date column only from the date table as it filters both fact tables.
Variance =
SUMX (
CROSSJOIN (
CROSSJOIN ( VALUES ( 'Item'[Item Name] ), VALUES ( City[City] ) ),
VALUES ( 'Dim Date'[Date] )
),
[Avg AOP Price] - [Actual Price]
)
@tamerj1 thanks i forgot to check date column , It works , Thanks for the solution .
User | Count |
---|---|
28 | |
11 | |
8 | |
6 | |
5 |
User | Count |
---|---|
35 | |
14 | |
12 | |
9 | |
7 |