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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
vjuhasz
New Member

Calculated mesaure substraction by Column in MATRIX/or any other mode?

Dears,

Having a data format something like this:

MONTHSELLERCUSTOMERSSALESCONVERSION RATE %
2021.01.01LUCY10110%
2021.01.01PAUL500%
2021.02.01LUCY1218%
2021.02.01PAUL6117%
2021.03.01LUCY15213%
2021.03.01PAUL6117%
2021.04.01LUCY17212%
2021.04.01PAUL7114%


And it is possible to convert to MATRIX, but how could I make any addition or substraction between columns in a matrix to get data like the BOLD one?

 LucyPaul 
 CUSTOMERSSALESCONVERSION RATE %CUSTOMERSSALESCONVERSION RATE %CONVERSION RATE DIFF
2021.01.0110110%500%-10%
2021.02.011218%6117%8%
2021.03.0115213%6117%3%
2021.04.0117212%7114%3%
2021.05.0119316%9111%-5%
2021.06.0122314%15213%0%
2021.07.0124417%16213%-4%
2021.08.0127415%17318%3%
2021.09.0129517%18317%-1%
2021.10.0132516%19316%0%
2021.11.0135617%19421%4%
2021.12.0137616%20420%4%

 

Thank you in advance!

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

@vjuhasz  see attached for an implementation. Here is the measure definition:

CR = 
if(HASONEVALUE('Table'[SELLER]),AVERAGE('Table'[CONVERSION RATE %]),
var minName=MINX('Table','Table'[SELLER])
var maxName=MAXX('Table','Table'[SELLER])
var a=SUMMARIZE('Table','Table'[MONTH]
,"mn",CALCULATE(min('Table'[CONVERSION RATE %]),'Table'[SELLER]=minName)
,"mx",CALCULATE(max('Table'[CONVERSION RATE %]),'Table'[SELLER]=maxName))
return AVERAGEX(a,[mn]-[mx]))

View solution in original post

1 REPLY 1
lbendlin
Super User
Super User

@vjuhasz  see attached for an implementation. Here is the measure definition:

CR = 
if(HASONEVALUE('Table'[SELLER]),AVERAGE('Table'[CONVERSION RATE %]),
var minName=MINX('Table','Table'[SELLER])
var maxName=MAXX('Table','Table'[SELLER])
var a=SUMMARIZE('Table','Table'[MONTH]
,"mn",CALCULATE(min('Table'[CONVERSION RATE %]),'Table'[SELLER]=minName)
,"mx",CALCULATE(max('Table'[CONVERSION RATE %]),'Table'[SELLER]=maxName))
return AVERAGEX(a,[mn]-[mx]))

Helpful resources

Announcements
November Fabric Update Carousel

Fabric Monthly Update - November 2025

Check out the November 2025 Fabric 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.

Users online (27)