-
1. Re: Find count of values selected in Filter
Matt LuttonOct 24, 2013 7:16 AM (in response to Anisha Nair)
How about the attached? The formula used is:
IF SIZE()==1
then sum([Banks: Automated tellers (per 100k adults)])
else 0
end
With a "Compute Using" set to "Country Name". Basically, if more than one row is returned, it returns 0 for all rows, and if only one row is returned, it displays the summed measure.
-
Book3 ML Edit.twbx.zip 284.6 KB
-
-
2. Re: Re: Find count of values selected in Filter
Anisha Nair Oct 24, 2013 10:41 PM (in response to Matt Lutton)Hi Matthew...Thanks for your inputs! It worked perfectly...
I need some more help with the same issue
On another view I need to display multiple measures, including GRP in a tabular chart. And this chart contains BrandLabel in the rows instead of Country. However the behaviour of GRP field must be the same. i.e.
- If only ONE country is selected in filter, show measure A for the selected Country
- If More than ONE country is selected, display measure A = "NA" or 0
When I add Country field to the details section, the tabular view gets altered. How do I achieve the required result in such a scenario?
I have attached a new workbook with sample data scenario.
-
Book3 AN.zip 65.5 KB
-
3. Re: Find count of values selected in Filter
Murali Govindu Oct 24, 2013 10:14 PM (in response to Anisha Nair)Can you build this in your sample workbook and attach, this would help to glance and resolve?
Good luck,
-
4. Re: Re: Find count of values selected in Filter
Anisha Nair Oct 24, 2013 10:42 PM (in response to Murali Govindu)Oops! I have added workbook...Please let me know if you are not able to view it
-
5. Re: Re: Find count of values selected in Filter
Murali Govindu Oct 24, 2013 11:37 PM (in response to Anisha Nair)Not in the second scenario...if you wish you compile a sample that would be handy.
-
6. Re: Re: Re: Find count of values selected in Filter
Anisha Nair Oct 24, 2013 11:59 PM (in response to Murali Govindu)The sample workbooks have been posted in the above thread. Posting it again for your reference.
-
Book3 AN.zip 65.5 KB
-
-
7. Re: Re: Re: Re: Find count of values selected in Filter
Prashant SharmaOct 25, 2013 12:06 AM (in response to Anisha Nair)
Hi Anisha,
If you want to create a column "A" which is 0 if more then 1 country is selected & if only one country is selected then wants to show "Impression" then attached is the file. Please check.
Warm Regards,
-
Book3 AN.twbx.zip 72.2 KB
-
-
8. Re: Re: Re: Find count of values selected in Filter
Anisha Nair Oct 25, 2013 1:17 AM (in response to Prashant Sharma)Thanks Prashant....but I do not have Country in my tabular chart "Rows" section. Country is a filter on the dashboard in which this view is present, Country is not present in the view itself
Can this be achieved with the above limitation?
-
9. Re: Re: Re: Re: Find count of values selected in Filter
Prashant SharmaOct 25, 2013 2:03 AM (in response to Anisha Nair)
One option to achieve the same is with the help of deselect the option of "Show Header" for Country but when multiple countries get selected it will not aggregate the values. For Eg.
If two values repeat for two countries then it will not going to show aggregation of these two.
Country Brand Measure
A x 25
B y 30
B x 45
B y 50
If the above table is your data, after what i did, it looks like:-
Brand Measure
x 25
y 80
x 45
Here x is repeating as i Hide only Country label. If in your database brand is not repeating then this method will work perfectly, but if not then table is looks like above view. Is it considerable for you or not?
Warm Regards,
-
10. Re: Re: Re: Re: Re: Find count of values selected in Filter
Anisha Nair Oct 25, 2013 4:14 AM (in response to Prashant Sharma)Unfortunately in my data, Brand is repeating for multiple countries, hence this solution won't be acceptable.
Do let me know if you find another solution to the issue
-
11. Re: Re: Re: Re: Re: Re: Find count of values selected in Filter
Prashant SharmaOct 25, 2013 4:51 AM (in response to Anisha Nair)
Hey checked the attached file & let me know this is working for you or not & after that i will explain what i did. I used different fields to achieve the same & Tableau is about tricks.
Warm Regards,
-
Book3 AN.twbx.zip 76.5 KB
-
-
12. Re: Re: Re: Re: Re: Find count of values selected in Filter
Anisha Nair Oct 25, 2013 4:57 AM (in response to Prashant Sharma)Yeah pretty close to what i want! However, when multiple countries are selected, column A shows more than one "0"?
-
13. Re: Re: Re: Re: Re: Re: Find count of values selected in Filter
Prashant SharmaOct 25, 2013 5:19 AM (in response to Anisha Nair)
-
Book3 AN.twbx.zip 81.0 KB
-