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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
bensiqc
Helper I
Helper I

Delta as Row Total in Matrix - Direct Query

First of all, I'm using DirectQuery method so creating any tables, etc., isn't an option for me.

 

I have a simple matrix visual containing a hierarchy. I have carrier and Month in the rows, year as the column, and a count for values. Rather than a sum total on the far right, I want to show a delta between the two columns. So, for example, the total for January would show "-370,455". Most methods I've found for doing this require creating a helper table, etc. I'm hoping there's a relatively simple way to do this using Direct Query.

 

bensiqc_0-1680190474817.png

 

1 REPLY 1
Anonymous
Not applicable

Hi @bensiqc,

You can refer to the following link to use ISINSCOPE function to check the current row context level and replace the calculation format if it on the total level.

Use IsInScope to get the right hierarchy level in DAX - Kasper On BI

Then you can get the min and max year from the current aggregations and use them as condition in variables to get correspond results and use in the difference calculations.

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.