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! Learn more

Reply
juanca
Helper II
Helper II

MEASURE in the current row context

Hi everyone,

 

I need to create a visualization with a table that shows the substraction between 2 fields, both are coming from different tables of my model and the link between them is a "key" field.

 

Currently, the substraction is calculated in a third auxiliar table using the "key" field I mentioned before, and then just adding the result to the visualization.

 

I am wondering if there is a more smart way to do the same and I have worked in creating a MEASURE that could make the calculation in the context of the row, unfortunatly what I always get is the difference between totals.

 

To put it more graphical, I want YELLOW-RED in my last column:

 duda.png

If you need some extra info do not hesitate to ask me.

 

Thanks a lot in advandce for your help.

Regards!

1 ACCEPTED SOLUTION
Vvelarde
Community Champion
Community Champion

@juanca

 

First Try:

 

Use Calculate:

 

DifBetween2Columns=Calculate(Sum('Table1'[Horas de JIra])) - Calculate('Sum'(Table2[horas de EAC]))




Lima - Peru

View solution in original post

3 REPLIES 3
Vvelarde
Community Champion
Community Champion

@juanca

 

First Try:

 

Use Calculate:

 

DifBetween2Columns=Calculate(Sum('Table1'[Horas de JIra])) - Calculate('Sum'(Table2[horas de EAC]))




Lima - Peru

Thank you very much for your fast and RIGHT answer!

 

I was obssesed trying to use CALCULATE with a filter argument but it is not necessary...

 

Jut to give something extra, DifBetween2Columns=Calculate(Sum('Table1'[Horas de JIra])- 'Sum'(Table2[horas de EAC])) seems to work same way and it avoids a CALCULATE formula...

 

Thanks again!

 

Kind regards

@Vvelarde

 

Making this calculation through a MEASURE is far more smart under my point of view but I have lost the possibility of creating a slicer or a visual filter from this field, I mean, I cannot use the MEASURE "DifBetween2Columns" as a filter.

 

Do you know how could I use this MEASURE as a filter?

 

Anyone replies to will be more than welcome as well.

 

Thanks again

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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