Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Tell us which business and trade publications you read most regularly: RESPOND NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
yangcelinexu
Creator
Creator

How to Use self defined Variable in visualisation

Hi,

I followed the video to create a Variable --vProfit successfully, but I can not find it in the list

http://help.qlik.com/en-US/sense/September2017/Content/Videos/Videos-adding-variable-from-assets.htm

here is the variable i created.

Screen Shot 2017-11-01 at 10.32.21.png

Screen Shot 2017-11-01 at 10.31.59.png

Want to use it in the line chart or scatter plot

but can not find it anywhere

I also tried to Create a Column or say a measure --iProfit (same expression)

was assume Qliq will create a Column for this measure     for each row. But it is not, I only have 1 point at last

Any one can help?

Any instruction? Thank you!

1 Solution

Accepted Solutions
mark6505
Partner - Specialist III
Partner - Specialist III

HI Again,

As Mark has suggested. Take a step back and make sure your expressions is working correctly.

From your last message, it sounds like you have you measure created. Try adding this to a KPI object or other chart and see if you are getting results.

If it is working, then you can just reuse the expression from the master items instead of adding to a variable.

Mark

View solution in original post

4 Replies
mark6505
Partner - Specialist III
Partner - Specialist III

Hi

Normally you would need to dollar expand to get the result of the expression.

So $(vProfit)

I would start by putting the variable into a text field and make sure are getting a result.

Mark

yangcelinexu
Creator
Creator
Author

Hi Mark,

Sorry did not really get how I could use this.

And I was use ''MasteItem'' --> Create a 'Meausre' and I use the Function

profit = Sales-Cost


then still the result is not right......

rittermd
Master
Master

Sounds like you are really confused.

Forget the variable for now.

Create a bar chart for example.  Use something as your dimension that makes sense.  For your measure use the fx to enter the editor and type in Sales-Cost assuming these are the field names you are using in your data.

You should now see a bar chart with the correct data and measure.

If that worked then you can try making the expression a variable if you need to and using that instead.

mark6505
Partner - Specialist III
Partner - Specialist III

HI Again,

As Mark has suggested. Take a step back and make sure your expressions is working correctly.

From your last message, it sounds like you have you measure created. Try adding this to a KPI object or other chart and see if you are getting results.

If it is working, then you can just reuse the expression from the master items instead of adding to a variable.

Mark