Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Is there a way to change dimension values when a user log in into a QlikView document?
For example,
changing a dimension from:
CustomerID | CustomerName |
---|---|
1 | Guy D |
2 | Yuri A |
3 | Mira L |
To (when a specific user log into the document):
CustomerID | CustomerName |
---|---|
1 | Guy D |
2 | Other Customer |
3 | Other Customer |
Thanks,
Guy
Guy
I have never tries putting a calculated dimension into a cyclic group.
I would consider two or more charts, conditionally hidden. Perhaps one to display when getcurrentfield() returns a normal field, and another to display when getcurrentfield() returns the calc dimension (with the chart expression adapted as necessary). Use getcurrentfield() in a conditional expression offor the show condition.
Hope that helps
Jonathan
Guy
If the users are authenticated on connection, then you can use OsUser() to identify the user. For display purposes you may want lookup table that connects the OsUser() value with the displayed customer name (let's day the two fields OsUserName and CustomerName)
Then use a calculated dimension:
=If(OsUser() = OsUserName, CustomerName, 'Other Customer')
It may be necessary to do some tweaking of the chart expressions to work with this dimension.
Hope that helps
Jonathan
You could look into using Section Access, which can be used to limit data based on your user access rights to the document. The main difference towards the using expression logic, is that with Section access the datat is actually not availabel for the user while with expressions the data would still be in the docuemtns data model and therby potentially accessible for the user.
hI,
The Problem is that i actually want the user to see others data, but only witout their names attached to it... therefore i would like the Customer dimension to be changed - so naturally all the data is in the document, but the user can see only its own name and "Other Customer" ...
Hi Jonathan,
I did as you told, it is working fine when using regular charts, but i have a chart that has Cyclic Group, and in the expression it goes:
sum( {$<$(vDim) = {"=Sum( {$<Date_Num={'>=$(=vPeriodMinDate)}>} network_gross_revenue) >= $(vPubMinRev)"} >} network_gross_revenue )
When vDim is the dimension name (=getcurrentfield(CyclicGroup)).
And as you suggested, the dimension in the case of the Customer should be an expression, and there is where the problem: The whole Set Analysis expression could not evaluate the
$(vDim) when it has an expression like "If(OsUser() = OsUserName, CustomerName, 'Other Customer')"
Thanks,
Guy
Guy
I have never tries putting a calculated dimension into a cyclic group.
I would consider two or more charts, conditionally hidden. Perhaps one to display when getcurrentfield() returns a normal field, and another to display when getcurrentfield() returns the calc dimension (with the chart expression adapted as necessary). Use getcurrentfield() in a conditional expression offor the show condition.
Hope that helps
Jonathan
Hi Jonathan,
I think i'll try to solve this problem similar to what you suggeted (using 2 charts, showing each depending on the user identity).
Thanks,
Guy