Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Guys,
I have the data as shown below,
Field | Customer | ID |
---|---|---|
A | C1 | 1 |
B | C2 | 2 |
C | C1 | 3 |
D | C2 | 1 |
Expected Output:
I want the no. of Fields which has same IDs. Both fields have same IDs but from different customers in the above bar chart. I've got the answer for this using expression, but I need to bring it as a dimension in script.
Please help.
Dimension
=Aggr(If(Count(TOTAL <ID> Customer) >= 2, Customer), ID, Customer)
Expression
Count(DISTINCT Customer)
No, Instead of using this in calculated dimensions, can we make it as dimension storing only the measure values in it?
Not sure I understand
Sunny, I'll explain my requirement in detail.
Assume I have 3 customers, each having some number of fields. When a customer is selected, I need to show the number of fields which are exactly same in other 2 customers by comparing the fields of selected customer.
To achieve this, I've used P() and E() function,
Count({<Customer=E(Customer),WithProp_ID=P(WithProp_ID)>}FieldName)
But if data increases, I was informed that these expressions in the front end may affect the performance(load time).
So I need to calculate those expressions in the script itself since it can increase the performance. Am I right? can we do like this?
or can I proceed with this method itself?
Doing something in script definitely improves performance, but not everything can be moved to the script. In your case where you plan to make selections, it might not be possible to move something to the script.... but then again, if this is just based on selection in customer and no other selection needs to be made or if made can be ignored, then you might be able to do this in the script.... it all depends on what you have and how you are executing this.
okay. Can we use set analysis expressions in the script, because I'm trying to use this in script.
Set analysis can only be used on the front end, not available in script. You can replicate set analysis using if statement.
Sunny, I've attached the sample data and QVW file with this. But could you help me to make this expression into a dimension?
Which expression.... attached qvw doesn't have any object in it? Which expression needs to be converted to a dimension?