Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I am working on a chart that present phone brand as dimension and brand share among users as measures.
I want to have the following features
for the fourth point, for example. If I select brand Samsung, instead of only presenting Samsung with measure = 100%.
It would be like this.
Samsung 100%
Apple 66%
Reason for the shares above is that all three users in month_id = 1 users Samsung. And two of them also has Apple. Brand Blackberry is not showing because it only has one user.
My expression:
Aggr(
If(
Count( DISTINCT
{1<user= P({$<month_id = $(=IF(GetSelectedCount(month_id) = 0,'{$(=Max(month_id))}','P({$} month_id)')) >}) >} user) > 1,
brand),
brand)
month_id | user | brand |
1 | A | Apple |
1 | A | Samsung |
1 | B | Samsung |
1 | B | Balckberry |
1 | C | Samsung |
1 | C | Apple |
Thanks in advance for the help.
It would be easier to work on possible solutions if you could upload a small sample QVF.
It's also not 100% clear if you want to count the users per brand (constraint 1.) for the respective month range defined in 2.-4. or across the entire data set.
Hence, it would be good to add some sample selections and expected results.
I've come up with a set expression like
{<
brand = p({<user = p(),brand>}brand)
*
{"=Count(DISTINCT {1<month_id =
$(=IF(GetSelectedCount(month_id) = 0,'{$(=Max(month_id))}','P({$} month_id)')) >} user) > 1"}
,month_id =
$(=IF(GetSelectedCount(month_id) = 0,'{$(=Max(month_id))}','P({$} month_id)'))
>}
and used this set expression in all aggregation functions.
Dimension would be just brand.
See attached a sample (left bar chart with suggested solution, right bar chart using the set expression in a calculated dimension, to demonstrate potential differences).
It would be easier to work on possible solutions if you could upload a small sample QVF.
It's also not 100% clear if you want to count the users per brand (constraint 1.) for the respective month range defined in 2.-4. or across the entire data set.
Hence, it would be good to add some sample selections and expected results.
I've come up with a set expression like
{<
brand = p({<user = p(),brand>}brand)
*
{"=Count(DISTINCT {1<month_id =
$(=IF(GetSelectedCount(month_id) = 0,'{$(=Max(month_id))}','P({$} month_id)')) >} user) > 1"}
,month_id =
$(=IF(GetSelectedCount(month_id) = 0,'{$(=Max(month_id))}','P({$} month_id)'))
>}
and used this set expression in all aggregation functions.
Dimension would be just brand.
See attached a sample (left bar chart with suggested solution, right bar chart using the set expression in a calculated dimension, to demonstrate potential differences).
Hey
Thanks again.
This is very helpful