Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi All,
I have the following bar chart that show sales oper sales person:
So the data is here filtered for 2022 and for a region. This region for example has 4 Salesman. I added an average line as a measure which caclulates basically: whole sales (from all regions)/all salesman
Now I have this line but it shows everytime the same value. Is it possible to only show the value once, like at the end? Otherwise there are so much numbers....
Thanks and best regards 🙂
Solved! Go to Solution.
Hi @Anonymous ,
I created some data:
Here are the steps you can follow:
1. Create calculated table.
Table 2 =
SUMMARIZE('Table','Table'[Region],'Table'[Salesman])
2. Create calculated column.
Rank =
RANKX(FILTER('Table 2','Table 2'[Region]=EARLIER('Table 2'[Region])),'Table 2'[Salesman],,ASC)
3. Create measure.
Avg =
AVERAGEX(ALL('Table'),'Table'[Amount])
Measure =
var _region=SELECTEDVALUE('Table'[Region])
var _max=MAXX(FILTER(ALL('Table 2'),'Table 2'[Region]=MAX('Table 2'[Region])),[Rank])
var _maxSalesman=MAXX(FILTER(ALL('Table 2'),'Table 2'[Rank]=_max&&'Table 2'[Region]=_region),[Salesman])
var _allmax=MAXX(ALL('Table 2'),[Rank])
var _allmaxSalesman=MAXX(FILTER(ALL('Table 2'),'Table 2'[Rank]=_max),[Salesman])
return
IF(
HASONEVALUE('Table'[Region])&&
MAX('Table'[Salesman])=_maxSalesman,[Avg],
IF(
NOT( ISINSCOPE('Table'[Region]))&&MAX('Table'[Salesman])=_allmaxSalesman,[Avg],
BLANK()))
4. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @Anonymous ,
I created some data:
Here are the steps you can follow:
1. Create calculated table.
Table 2 =
SUMMARIZE('Table','Table'[Region],'Table'[Salesman])
2. Create calculated column.
Rank =
RANKX(FILTER('Table 2','Table 2'[Region]=EARLIER('Table 2'[Region])),'Table 2'[Salesman],,ASC)
3. Create measure.
Avg =
AVERAGEX(ALL('Table'),'Table'[Amount])
Measure =
var _region=SELECTEDVALUE('Table'[Region])
var _max=MAXX(FILTER(ALL('Table 2'),'Table 2'[Region]=MAX('Table 2'[Region])),[Rank])
var _maxSalesman=MAXX(FILTER(ALL('Table 2'),'Table 2'[Rank]=_max&&'Table 2'[Region]=_region),[Salesman])
var _allmax=MAXX(ALL('Table 2'),[Rank])
var _allmaxSalesman=MAXX(FILTER(ALL('Table 2'),'Table 2'[Rank]=_max),[Salesman])
return
IF(
HASONEVALUE('Table'[Region])&&
MAX('Table'[Salesman])=_maxSalesman,[Avg],
IF(
NOT( ISINSCOPE('Table'[Region]))&&MAX('Table'[Salesman])=_allmaxSalesman,[Avg],
BLANK()))
4. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
@Anonymous , Create a measure like
calculate(averagex(Values(Table[Salesman]), [Sales]) , allselected())
HI ,@amitchandak,
I have my average already. I want that the data label only appears ones.
Thanks and BR
User | Count |
---|---|
91 | |
77 | |
71 | |
64 | |
58 |
User | Count |
---|---|
106 | |
97 | |
76 | |
63 | |
60 |