Hi all,
I have a set of users who should only be able to see volumes. Another set should be able to see revenues and volumes. My data table is like this:
Date, Revenue, Volume, Product
1/1/2015, $1000, $500, A
1/1/2015, $1050, $400, B
Is there a way to create 1 chart where, depending on the user, it will display revenue or volume?
I am thinking of using OSuser() but not sure of the most sustainable way to do this. Thanks.
Hi Sifat
PFA the .qvw for your reference. Here I've used a variable to get the username using OSUser(), then for my user I've assigned BIT_REV =1(if you want to show revenue, or 0 if you don't)
BIT_VOL =1(if you want to show volume, or 0 if you don't)
in an inline table.
Then using the condition if(only({<USERNAME={'$(=OSUser())'}>}BIT_REV)=1,1,0) in the Presentation tab to show the column Revenue and if(only({<USERNAME={'$(=OSUser())'}>}BIT_VOL)=1,1,0) in the Presentation tab to show the column Volume, I got the desired result.
Regards
Pratyush
why not have 2 charts with a conditional show based on a variable set by a button?
Andy
Thanks awhitfield, I was thinking that this means doubling up on all the charts, i.e. 2 of everything. Would it be possible to have just one version of all charts but display 2 different fields depending on the user? I'm guessing in expression I have to do something like if(match(OSUser(),'Bob'),FieldA) but this seems tedious.
if you hide the Revenue from some users using section access, it will show nothing on the chart.
So you could have one chart with 2 expression : sum(Revenue) and sun(Volume) and for some users the 1st one will just show nothing.
This actually works - the legend of the hidden field still stays though. Is there a way to remove that?
Hi Sifat
PFA the .qvw for your reference. Here I've used a variable to get the username using OSUser(), then for my user I've assigned BIT_REV =1(if you want to show revenue, or 0 if you don't)
BIT_VOL =1(if you want to show volume, or 0 if you don't)
in an inline table.
Then using the condition if(only({<USERNAME={'$(=OSUser())'}>}BIT_REV)=1,1,0) in the Presentation tab to show the column Revenue and if(only({<USERNAME={'$(=OSUser())'}>}BIT_VOL)=1,1,0) in the Presentation tab to show the column Volume, I got the desired result.
Regards
Pratyush
is suppress when null checked?
Yes - that still keeps the legend on.