Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Changing dimension values

Hi,

Is there a way to change dimension values when a user log in into a QlikView document?

For example,

changing a dimension from:

CustomerIDCustomerName
1Guy D
2Yuri A
3Mira L

To (when a specific user log into the document):

CustomerIDCustomerName
1Guy D
2Other Customer
3Other Customer

Thanks,

Guy

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

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

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

6 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

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

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
ToniKautto
Employee
Employee

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.

Not applicable
Author

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" ...

Not applicable
Author

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

jonathandienst
Partner - Champion III
Partner - Champion III

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

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

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