Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
I'd like to dynamically rename of tags in a dimension.
When I click on any ID from list box ID, in the chart "Output" selected ID should called "0", previous 2 ID - "-1", "-2" and next 2 ID "+1","+2"
Please find attached file.
Thanks,
I resolved the issue.
I created a varaible vDRank=Aggr(Rank(-only({<ID=,FI_ID={">=$(=max(FI_ID)-2)<=$(=max(FI_ID)+2)"}>}ID)), ID)
In dimension:
Aggr(Rank(-only({<ID=,FI_ID={">=$(=max(FI_ID)-2)<=$(=max(FI_ID)+2)"}>}ID)), ID)-vDRank
Hello Vladimir
May be this calculated dimension works for you:
=Aggr(Rank(only({<ID=,FI_ID={">=$(=max(FI_ID)-2)<=$(=max(FI_ID)+2)"}>}Text)), ID)-3
Regards!
Thanks for helping.
Order should be appositive.
Actually I need to add wording like step-1, step-2 and so on.
If it's not doable, I can use only numbers
I fixed the appositive order
=Aggr(Rank(-only({<ID=,FI_ID={">=$(=max(FI_ID)-2)<=$(=max(FI_ID)+2)"}>}ID)), ID)-3
but I have problem when I select the first number, it should be RANK -1
=Aggr(Rank(only({<ID=,FI_ID={">=$(=max(FI_ID)-2)<=$(=max(FI_ID)+2)"}>}Text)), ID)-1
if I select the second number, it should be RANK -2
=Aggr(Rank(only({<ID=,FI_ID={">=$(=max(FI_ID)-2)<=$(=max(FI_ID)+2)"}>}Text)), ID)-2
How to easy combine 3 conditions?
Please attached my file.
I found out how to do with condition
IF(COUNT(TOTAL({<ID=,FI_ID={">=$(=max(FI_ID)-2)<=$(=max(FI_ID)+2)"}>}ID)=1,
Aggr(Rank(only({<ID=,FI_ID={">=$(=max(FI_ID)-2)<=$(=max(FI_ID)+2)"}>}Text)), ID)-1,
IF(COUNT(TOTAL({<ID=,FI_ID={">=$(=max(FI_ID)-2)<=$(=max(FI_ID)+2)"}>}ID)=2,
Aggr(Rank(only({<ID=,FI_ID={">=$(=max(FI_ID)-2)<=$(=max(FI_ID)+2)"}>}Text)), ID)-2,
IF(COUNT(TOTAL({<ID=,FI_ID={">=$(=max(FI_ID)-2)<=$(=max(FI_ID)+2)"}>}ID)>=3,
Aggr(Rank(only({<ID=,FI_ID={">=$(=max(FI_ID)-2)<=$(=max(FI_ID)+2)"}>}Text)), ID)-3)))
It works.
But it doesn't work in some my cases.
Because key ID sometimes doesn't match with position
Maybe something like this
only({<ID=,FI_ID={">=$(=max(FI_ID)-2)<=$(=max(FI_ID)+2)"}>}
IF(ID=ID,'Step',
IF(ID-1=ID-1,'Step-1',
IF(ID+1=ID+1,'Step+1')))
)
Is it possible to add a condition like if ID take place number 1 in the rank position, do this???
What condition possible to add to get it?
maybe firstvalue() or firstindex() or firstsortedvalue()
????????????????????????????????
Any ideas, guys?
Maybe use pick() , when ID takes 1 or 2 places, use the same rank expression just -1 or -2.
I resolved the issue.
I created a varaible vDRank=Aggr(Rank(-only({<ID=,FI_ID={">=$(=max(FI_ID)-2)<=$(=max(FI_ID)+2)"}>}ID)), ID)
In dimension:
Aggr(Rank(-only({<ID=,FI_ID={">=$(=max(FI_ID)-2)<=$(=max(FI_ID)+2)"}>}ID)), ID)-vDRank