1 of 1 people found this helpful
There are plenty of ways to go at this. I must say I'm not very familiar with using the custom aspects of the filters...I'm partial to creating calculated fields to hold formulas rather than inserting them directly into the filter. That way, I can expose the result in the view if I so choose.
You could try something like this:
IF CONTAINS([DimensionField],'VRI') OR CONTAINS([DimensionField],'Tran')
Then, just drag that new field into the filter shelf and choose to expose 'Show' only.
Mark is right - you could actually use your original formula as a calculated field - it would evaluate as a boolean T/F
Yeah this is the way I ultimately went with. Thanks!
I have a question based on filter condition. I have a list of URL's with sum of page views.So I have url's in my row and there sum of page views as column. Now I have to exclude few Url's based on a specific condition, for which I created calculated field and done so. Now as a result in below screenshot I have list of Url's with respective page views and excluding what I need. Here the problem arises. I want to have top 10 of these Url's. Now I want top 10 Url's out of this view.
The problem I am facing is if I find top 10 Url's from the calculated field "Page URL Filter" it does not give top N row. If I filter original dimension Page URL decode it gives only 6 of them. I think because it is filtering on entire data and as my few URL's are excluded in calculated filed so it gives just six.
How can I get the top N url's when I have used a calculated field filter on the same dimension as used in my row.
Any help appreciated..!!
I have the same problem as Rupali.
Can anyone point me to a good resource for learning how to write custom calculations that include filters?
3 of 3 people found this helpful
So in your calculated field, which excludes certain elements, and is used to filter...if you change the filter to be 'Add to context' that will push the filter up the calculation pipeline and so get applied before the Top N is.
In an example here I show the Top 10 customers, just using the Top 10 filter on SUM([Sales])
I then create a filter calculated field to exclude certain elements (Sean and Tom)
add this to the filter shelf and set to true...and now I only have 8 people in my top 10...as you've experienced
However I now set the [dummy filter] to 'Add to context'
and I'm back at 10 again, minus Sean and Tom
an alternative on this theme, would be to create a calculated measure for your filtered list. so in my example I've done
[Sales Exclude Filtered]
I then use this in my Top N filter (not the original SUM([Sales]) measure, and again I'm back to 10 members, minus Sean and Tom
Hope that does the trick for you, else for full Top N flexibility you'll probably need to use RANK or INDEX, which (as you say) means you'll need (in my example) [Customer Name] in the VizLoD.
Thanks for the detailed answer that helped. Although I have to submit it little earlier.
Although I have to submit it little earlier
...not sure I understand...are you referring needing the filter applied earlier than a context?...
Sorry for misunderstanding. Just wanted to say I submitted the assignment two months back..
No probs!...just wanted to check you had the solution you need!...I hadn't realised it was such an old thread!
I have almost similar situation but my filter does not work.
So I have created a custom layout filter based on parameter with set of values, which has hierarchy as well. In the code for parameter, I have upto 4 character codes. From the database / query, I have result on the sheet, and when I put the field on filter card, set the Condition -> By Formula -> as "Contains ([FindStateVal], [StateCodes]), for all selections it work, but when I select "All", it blanks out. This is because there is no such value in StateCode field as "ALL".. That All needs to be all the values to be used.
Is there a way to write conditional criteria in Filter screen somewhere to ignore CONTAIN formula in case of "All" ?
The issue is I have hierarchy of Area -> Region -> State and instead of showing 3 filters on dashboard which would take up lot of space, I had thought of this approach.
Any help would be greatly appreciated..
How does the Contain filtered set would work, if someone selects the value with "VRI"? I replicated that for my situation and it works fine when "All" is selected, but otherwise blanks out. I actually posted my situation.