Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Sorry My English is not so good.
I would like to know if it is possible to create a measure that calculates the difference between the seller Peter and the other sellers (these are sales in this year)
| vendedor | importe |
| Peter | 3300 |
| Frank | 2150 |
| John | 2000 |
| David | 600 |
I would like powerbi to show this
| vendedor | importe | difer. Peter | % dif. Peter |
| Peter | 3300 | 0 | 0 |
| Frank | 2150 | 1150 | 34,84 |
| John | 2000 | 1300 | 39,39 |
| David | 600 | 2700 | 81,81 |
this is the link to pbix to do test.
https://drive.google.com/open?id=1JLupC_VSkdcV8dHlP_BcKfeTEiRhYsZU
Thank you for your attention
Solved! Go to Solution.
Try this DAX measures
Difference =
var _peter= SUMX(FILTER(ALLSELECTED('Table'),'Table'[vendedor]="Peter"),'Table'[Importe])
var _selected =SUMX(FILTER('Table','Table'[vendedor]=SELECTEDVALUE('Table'[vendedor])),'Table'[Importe])
var _difference= _peter-_selected
return _difference
% diff =
var _peter= SUMX(FILTER(ALLSELECTED('Table'),'Table'[vendedor]="Peter"),'Table'[Importe])
var _percentage= [Difference]/_peter
return _percentage
Did I answer your question? Mark my post as a solution!
Appreciate with a kudos 🙂
Hi @pakovic
1. Place Table1[vendedor] in a table visual
2. Place these measures in the visual (note we are not placing Table1[importe] any more, we have built a measure for it)
Importe_Measure = SUM(Table1[Importe]) difer. Peter =
CALCULATE([Importe_Measure], Table1[vendedor] = "Peter") - [Importe_Measure]
difer. Peter % =
DIVIDE([difer. Peter], CALCULATE([Importe_Measure],Table1[vendedor]="Peter"))
Please mark the question solved when done and consider giving kudos if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
Hi @pakovic
1. Place Table1[vendedor] in a table visual
2. Place these measures in the visual (note we are not placing Table1[importe] any more, we have built a measure for it)
Importe_Measure = SUM(Table1[Importe]) difer. Peter =
CALCULATE([Importe_Measure], Table1[vendedor] = "Peter") - [Importe_Measure]
difer. Peter % =
DIVIDE([difer. Peter], CALCULATE([Importe_Measure],Table1[vendedor]="Peter"))
Please mark the question solved when done and consider giving kudos if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
Try this DAX measures
Difference =
var _peter= SUMX(FILTER(ALLSELECTED('Table'),'Table'[vendedor]="Peter"),'Table'[Importe])
var _selected =SUMX(FILTER('Table','Table'[vendedor]=SELECTEDVALUE('Table'[vendedor])),'Table'[Importe])
var _difference= _peter-_selected
return _difference
% diff =
var _peter= SUMX(FILTER(ALLSELECTED('Table'),'Table'[vendedor]="Peter"),'Table'[Importe])
var _percentage= [Difference]/_peter
return _percentage
Did I answer your question? Mark my post as a solution!
Appreciate with a kudos 🙂
thank you very Much !!!
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 5 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 16 | |
| 8 | |
| 7 | |
| 7 |