Forum Discussion
Differences between 2 Matrix in Power BI
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
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 - lastyear
Best Regards,
Dale
- oren8 years ago
Helper 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 ago
Helper III
no option?