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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

How to measure two matrix from two table

I have two matrix. One is a current and one is base.

I want to get the percentage differences  betwen the curent and base filter by route/destination.

Both of the table have relationship with Month as the user can select month to check the differences 

I use this formula for the differences

 

VAR __BASELINE_VALUE = SUM('Compare by Route'[Revenue])

VAR __MEASURE_VALUE = CALCULATE(SUM('Current'[Revenue]), 'Current'[Period] IN { "TODAY" })
RETURN
    IF(
        NOT ISBLANK(__MEASURE_VALUE),
        DIVIDE(__MEASURE_VALUE - __BASELINE_VALUE, __BASELINE_VALUE)
    )
 
But it doest give the correct output as I check with the same route It does not gave 0 %
1 ACCEPTED SOLUTION
mwegener
Most Valuable Professional
Most Valuable Professional

Hi @Anonymous ,

 

these are just two tables with an inactive Many to Many relationship.

Your data model should have dimension tables and fact tables.

Your two tables are fact tables, but you need dimension tables (date/calendar, route/destination) for filtering. These should have a 1 to many relationship to the fact tables. 

Take a look here.

https://docs.microsoft.com/en-us/power-bi/guidance/star-schema

 

If you provide sample data, I can help you with the modeling.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


View solution in original post

4 REPLIES 4
mwegener
Most Valuable Professional
Most Valuable Professional

Hi @Anonymous ,

 

can you post a screenshot of the modelview.

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


Anonymous
Not applicable

cclemonq10_0-1626529365080.png

This is my model view. I actually reference the Compare by Route to the Current

mwegener
Most Valuable Professional
Most Valuable Professional

Hi @Anonymous ,

 

these are just two tables with an inactive Many to Many relationship.

Your data model should have dimension tables and fact tables.

Your two tables are fact tables, but you need dimension tables (date/calendar, route/destination) for filtering. These should have a 1 to many relationship to the fact tables. 

Take a look here.

https://docs.microsoft.com/en-us/power-bi/guidance/star-schema

 

If you provide sample data, I can help you with the modeling.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


Anonymous
Not applicable

Thank you very much.

I made the dimension table and use the  dimension table for the row and matrix for the comparison and now my data as per intent.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors