Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
patricesalem
Creator II
Creator II

Qlik desktop - security to access data

Hello

I have created a sales report using qlik desktop.

This report is connected to a database located in the server network \patrice\ZSQ042.xls (full sales database)

Different ZSQ042 files are available for all sales people (each file only contains each salesman data) :

\salesman1\ZSQ042.xls   (sales for territory 1)

\salesman2\ZSQ042.xls   (sales for territory 2)

\salesman3\ZSQ042.xls   (sales for territory 3)


Another file located in the server, areas.xls, "makes the link" between the windows session name of each salesman and the folder where their zsq042 file is located:

windows session namenameZSQO42 file
salesman1XXXX\salesman1\ZSQ042.xls
salesman2YYYY\salesman2\ZSQ042.xls

Up to now, the sales report was based on Excel, vba script and Power Query

The vba script was able to retrieve the windows session name and match this name with what is indicated in the areas.xls file in order to download the relevant ZSQ042.xls file and run all necessary actions to run the dedicated sales report.

Is there a way to change the datasource of my qlik report depending on the windows login of the person who launches the qlik report ?

any idea would be welcome !

thanks

pat

2 Replies
raman_rastogi
Partner - Creator III
Partner - Creator III

Hi Salem

You can use session access

https://help.qlik.com/en-US/sense/June2018/Subsystems/PlanningQlikSenseDeployments/Content/Deploymen...

As session access only available on qliksence server not on desktop.

Try this approach if you have few salesmen

1- Concatenate all sales data with flag.

ex- Load *  , 'salesman1'  as Flag from salesman1\ZSQ042.xls

concatenate

Load *  , 'salesman2'  as Flag from salesman2\ZSQ042.xls

...

...

....

and in expression you have to give some conditions like

If(Osuser()='salesman1',Sum(Sale) ...........)


Raman

patricesalem
Creator II
Creator II
Author

ok Raman, I will have a go...

thanks