Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements

QlikWorld 2023, a live, in-person thrill ride. Save $300 before February 6: **REGISTER NOW!**

- Qlik Community
- :
- Forums
- :
- Analytics
- :
- App Development
- :
- Qlik sense set-analysis on chart dimentsion

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

edwi0012

Contributor III

2019-12-02
06:04 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Qlik sense set-analysis on chart dimentsion

Hi!

I'm trying to show reports vs time for an operation and compare it with a target. The target can't be measured normally on on the coating operation operation. Instead I want to have the target as a function of OrderQTY and CarrierQTY.

The expression looks like this:

Sum({$<$(CoatingOperations)>}[Target]) /

( sum({$<FlagLast90Days={'1'},$(CoatingOperations))>}[OrderQTY])/

sum({$<FlagLast90Days={'1'},$(CoatingOperations))>}CARRIERQTY)

)

( sum({$<FlagLast90Days={'1'},$(CoatingOperations))>}[OrderQTY])/

sum({$<FlagLast90Days={'1'},$(CoatingOperations))>}CARRIERQTY)

)

and

**sum({$<FlagLast90Days={'1'},$(CoatingOperations))>}[OrderQTY])/**** sum({$<FlagLast90Days={'1'},$(CoatingOperations))>}CARRIERQTY) ** should evaluate to a constant value of e.g. 250 based in the last 90 days.

What we will have is then

Sum({$<$(CoatingOperations)>}[Target]) / 250

Seems straight forward? But in a bar graph which has Target vs date. It doesn't get a constant value. It's evaluated for every single date. How can I define a value that is evaluated for certain selections before it's evaluated in the graph?

The target should change for every date, but orderQTY/CarrierQTY should be a constant evaluated for the last 90 days.

I've tried to include Date=, so the latter part should ignore the dimension. But that means I can't make any date selections anymore, which is relevant to see the target for different date. How can I calculate a constant in the front end and use it in visualisations?

**sum({$<FlagLast90Days={'1'},Date=, $(CoatingOperations))>}[OrderQTY])/**** sum({$<FlagLast90Days={'1'},Date=, $(CoatingOperations))>}CARRIERQTY)**

Thanks for replies

Edvard

- Tags:
- kpi

655 Views

1 Solution

Accepted Solutions

jonathandienst

Partner - Champion III

2019-12-03
01:30 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Override the dimensions with TOTAL:

*sum({$<FlagLast90Days={'1'},$(CoatingOperations))>} TOTAL OrderQTY)/*

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

8 Replies

2019-12-02
06:20 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

May be try this way

**sum({1<FlagLast90Days={'1'},Date=, $(CoatingOperations))>}[OrderQTY])/**** sum({ 1<FlagLast90Days={'1'},Date=, $(CoatingOperations))>}CARRIERQTY)**

**Or**

**If(GetSelectedCount(Date)>0, **

**sum({1<FlagLast90Days={'1'}, Date=, $(CoatingOperations))>}[OrderQTY])/ sum({ 1<FlagLast90Days={'1'},Date=, $(CoatingOperations))>}CARRIERQTY)**

**sum({$<FlagLast90Days={'1'},Date=, $(CoatingOperations))>}[OrderQTY])/ sum({ $<FlagLast90Days={'1'},Date=, $(CoatingOperations))>}CARRIERQTY)**

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)

651 Views

edwi0012

Contributor III

2019-12-02
07:16 AM

Author

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

It will still count the KPI (Target/(orderQTY/CarrierQTY) different for each single day of the week. I know and have checked that the target is constant during most weeks, it changes between weeks and some individual days of the year.

I want to calculate a sum(OrderQTY)/sum(CarrierQTY) variable that should be based on the last 90 days. Then divide the daily target with that constant numerical value and be able to do date selections. But the OrderQTY and CarrierQTY will change depending on the date selections and if I exclude the date selections it won't be agile and in a bargraph it will still do the calculations based on date, even if it's excluded in set analysis since it's a dimension.

632 Views

2019-12-02
08:05 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

What is the "CoatingOperations"?

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)

edwi0012

Contributor III

2019-12-02
10:05 AM

Author

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

It's a visualisation for a production and especially target exists for multiple operations, but specifically the coatingoperation measures vs their OrderQTY/CarrierQTY. basically, that's inhouse specific selection.

614 Views

2019-12-02
11:45 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

How did you define the variable?

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)

608 Views

edwi0012

Contributor III

2019-12-03
01:16 AM

Author

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

That vairable is unfortunatlely not the issue, it's just a setanalysis for selection specific operations. I'm using it and similar on many places elsewhere in the visualizations, therefore I put it in a variable instead, to be able to change at one place instead of many.

But if I could do that to the latter part it would solve the problem. when I make a variable of sum(OrderQTY)/sum(CarrierQTY) with all the set analysis for selections. When I use it, the variable expansion put's in the code in the function and evaluating there, which interfere with my dimensions and selections.

vL.factor = sum(OrderQTY)/sum(CarrierQTY) = e.g. 250

How it is:

f(x) = Target/$(vL.factor) = Target / sum(OrderQTY)/sum(CarrierQTY)

How I need it, because of the set analysis inside vL.factor

f(x) = Target /$(vL.factor) = Target / 250

Is it more clear now what I'm searching for? Is this possible in anyway?

585 Views

jonathandienst

Partner - Champion III

2019-12-03
01:30 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Override the dimensions with TOTAL:

*sum({$<FlagLast90Days={'1'},$(CoatingOperations))>} TOTAL OrderQTY)/*

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

edwi0012

Contributor III

2019-12-03
03:15 AM

Author

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Thanks! This seems to be giving the correct result! Have to read up more on how that keyword works 😉

Thanks again

Regards

Edvard

560 Views