Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
trying both ways , but wrong ..can I have some help please
I want to only ever count customers that only order on a specific month, and not on any other month of the year
e.g August
I have tried this way but don't work
Count(DISTINCT if([Month]='Aug', CustomerID))
I have heard you can do this with an only command
only({<[Month]={'Aug'}>} CustomerID)
but how do you count using an only?
please help
And if you like the Only() idea maybe
Count({<CustomerID = {"=Only(Month)= 'Aug' "} >} DISTINCT CustomerID)
Maybe use
Count({<CustomerID = e({<Month = e({<Month = {'Aug'}>}) >})>} DISTINCT CustomerID)
or
Count({<CustomerID = e({1<Month -= {'Aug'}>}) >} DISTINCT CustomerID)
And if you like the Only() idea maybe
Count({<CustomerID = {"=Only(Month)= 'Aug' "} >} DISTINCT CustomerID)
Hi
this method worked the best
thanks again team !
Stefan,
This is interesting - I'm trying to learn more about the E() and P() functions. Can you explain what you are trying to do here? My novice take on it is - moving from the innermost E outwards - that you are excluding all sales from the set that occurred in august, and then you are excluding all the remaining months. Seems like this would leave you with an empty set.
What am I missing?
Hi
stefan
Count({<CustomerID = {"=Only(Month)= 'Aug' "} >} DISTINCT CustomerID)
I am trying to add stop a user selecting the dimension Department
i have tried adding the following
Count({< Department =, CustomerID = {"=Only(Month)= 'Aug' "} >} DISTINCT CustomerID)
but the measure is still being affected
any ideas please
Looking at the first expression:
1) Make a virtual selection of 'Aug' in Month field
2) Select excluded on virtual list box Month
Now this should result in all possible Month values except Aug being selected
3) Select excluded on virtual CustomerID list box
This should result on selection of CustomerID that don't have a relation to the Month selected (all Month except Aug).
Hm, maybe this selects also the Customer ID that don't have a relation to any Month (including Aug).
And using especially e() could get troublesome if other selections needs to be taken into account.
So Joanna is probably right that the third expression is the easiest expression to understand and maintain.
Thank you Stefan.
This seems unexpected.
Can you describe what happens when you select a specific department?