Forum Discussion
Differences between 2 Matrix in Power BI
Hi Oren,
Can you share a sample and the expected result, please?
Best Regards,
Dale
hi again
attached is an example
what i need is a third Matrix with the diff between the 2 i have- as you can see the 2 matrix are change based on filter (each matrix have different filter)
thanks a lot
oren
- oren8 years agoHelper III
anything ?
- v-jiascu-msft8 years agoMicrosoft Employee
Hi oren,
You can try a single measure with "SAMEPERIODLASTYEAR" like below.
Measure = VAR thisyear = SUM ( FactSales[SalesQuantity] ) VAR lastyear = CALCULATE ( SUM ( FactSales[SalesQuantity] ), SAMEPERIODLASTYEAR ( DimDate[Datekey] ) ) RETURN thisyear - lastyearBest Regards,
Dale
- oren8 years agoHelper III
Dhanks Dale
as you seggested i put this dax -
DiffDiscount =
VAR thisyear =
SUM ( 'DATA'[Discount] )
VAR lastyear =
CALCULATE (
SUM ( 'DATA'[Discount] ),
SAMEPERIODLASTYEAR ( 'Dateuniqe'[PriceLogDate] )
)
RETURN
thisyear - lastyearbut i just get the same data as in the "current Discount"
(maybe i dont know waht to use in the "SAMEPERIODLASTYEAR ( 'Dateuniqe'[PriceLogDate] )" - i just took a uniq dates table (is it right?)
attached is the data i got (the right table)
thanks again
oren
- oren8 years agoHelper III
no option?