Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi community,
I have list box of Variable A and chart with trending Variable A by months.
Who knows a trick how select tag from Variable A and show their own distributions by months.
Usually it's shown 100%.
Thanks,
I did it.
Maybe it's not very easy way, but
if([Primary purpose of visit]='l',
Count({<[Primary purpose of visit]={'l'}>}TOTAL <MYear> [Primary purpose of visit]))/
count({<[Primary purpose of visit]=>} TOTAL <MYear> [Primary purpose of visit])
In the expressions tab you could add one new expression, just with the same formula used in the graph you have, but checking the option of 'relative':
With this, It will show the distribution by months. Then, you could use the conditional calculation of the expressions you have. On the first one, put getSelectedCount(variable A)<>1. On the new one, getSelectedCount(variable A)=1. This way, the graph will change the showed information depending on the selection you make.
Hope it helps
Thank for reply.
But it didn't work. When I select any tag from Variable A, it calculates based on my selection. I get different results.
My expression:
Count({<[Variable A]={'a','b','c'}>}[Variable A])/
Count(TOTAL <MYear> [Variable A])
Other words,
when I select any tag from Variable A,
it should be shown only this tag distributions by months.
For example: tag a:
Regards,
Now I undestand what you are looking for. Your formula is ok, just have to add a set analysis to the TOTAL clause, not to be modified by the selection:
Count({<[Variable A]={'a','b','c'}>}[Variable A])/
Count({1}TOTAL <MYear> [Variable A])
In this case It always shows all value, not modified by the selection.
It needs some tricks for it.
The idea is: when nothing selected, it shows all tags by months.
When I select any tag from Variable 2, it should be shown only this tag by months with the same %.
I don't know how to do, if I select tag from Variable A, use the same count, if I didn't select.
Because if I select the tag, it recalculates based on my selection count.
Thanks,
My example does change on every selection:
One value selected:
Could you send your example, please?
I just used the formula that I posted:
Num(
Count(EmployeeID)
/Count({1}TOTAL<Year> EmployeeID)
, '#.###,00%') //Just for formatting
In your case, EmployeeID=[Variable A] and Year=MYear. Please note that the {1} is only in the second Count expression.
Good Luck!
Do you have only Year dimension?
Please see my example.