Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
oren
Helper III
Helper III

Differences between 2 Matrix in Power BI

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 

7 REPLIES 7
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi Oren,

 

Can you share a sample and the expected result, please?

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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 דוגג.PNG

 

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

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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 

דוגג.PNG

no option?

anything ?

Anonymous
Not applicable

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

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Kudoed Authors