Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Everyone,
I have created a Variable in the Variables
vCurrentSelection =SubField(GetCurrentSelections(), ':',2)
and now I am trying to use the variable in Set analysis, but it is not working
=Count({<[Session Name] = {"$(=vCurrentSelection)"}>}[Session Name])
Can someone help me with this.
thanks in advance.
Naresh
How about this
=Count({<[Session Name] = p($(='[' & SubField(GetCurrentSelections(), ':', 1)))>} [Session Name])
Hi Chanty,
I'll be selecting only one value at time.
In Brief, my requirement is, If I select a value from one filed then I want to count the same value in 10 different fields.
Thanks,
Naresh
No Sunny. Getting Null value.
@
My bad... can you try this
=Count({<[Session Name] = p($(='[' & SubField(GetCurrentSelections(), ':', 1) & ']'))>} [Session Name])
You are a rock star mate .
I am trying to understand this, when you gave 1 as third parameter for SubField() then it should return the Field name right!
But, why it wasn't working when we put the =SubField(GetCurrentSelections(),':',2) in a variable.
If you don't mind can you explain me.
Thanks,
Naresh
What I am using is slighly different then what you were trying to do... In your example, you selected XYZ in Operating Name, right? and want to count all Session Name with the value XYZ?
You were trying to do this
=Count({<[Session Name] = {'XYZ'}>} [Session Name])
I did this
=Count({<[Session Name] = p([Operating Name])>} [Session Name])
Basically, what p() function does is that it looks for matching values in Operating Name field which are present in Session Name. Since, you have selected XYZ in Operating Name, it indirectly looks to count XYZ in Session Name. Read more about it here Indirect Set Analysis for P() and E()
So, by using SubField() with 1... i picked the field name... rather than it's value and then used dollar sign expansion to convert the string Operating Name to the field Operating Name.
yeah, makes sense.
thanks once again.
Thanks,
Naresh
No problem at all
Hi Sunny,
What if I want to select "XYZ" from any field, still want to count the times it appears in different fields. Sorry, to bug you again.
Thanks,
Naresh
Select "XYZ" from any field and still want to count the times it appears in different fields? Which different fields?