Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi
i have 2 metrix that came from the same source
each metrix have diffrent data that change based on 2 diffrent filters i did (date filters)
now i wand to create anothe metrix that show the difrences between the two tables
thanks a lot
oren
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
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
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 - lastyear
but 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
no option?
anything ?
Hi @oren
You will not be able to compare 2 matrix as such. You need to have measures to do this.
For ex: you may have sum ( sales) in Matrix1. Matrix 2 with different date filter say fo ex 05/18/2018 in Matrix1 and 05/19/2018 in Matrix 2.
In your New matrix, you may need to like this:
Sales_diff = CALCULATE ( SUM(Sales), date="05/18/2018" )-CALCULATE ( SUM(Sales), date="05/19/2018" )
Hope this gives you the direction.
Thanks
User | Count |
---|---|
98 | |
75 | |
74 | |
49 | |
26 |