Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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({$<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
Override the dimensions with TOTAL:
sum({$<FlagLast90Days={'1'},$(CoatingOperations))>} TOTAL OrderQTY)/
sum({$<FlagLast90Days={'1'},$(CoatingOperations))>} TOTAL CARRIERQTY)
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))
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.
What is the "CoatingOperations"?
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.
How did you define the variable?
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?
Override the dimensions with TOTAL:
sum({$<FlagLast90Days={'1'},$(CoatingOperations))>} TOTAL OrderQTY)/
sum({$<FlagLast90Days={'1'},$(CoatingOperations))>} TOTAL CARRIERQTY)
Thanks! This seems to be giving the correct result! Have to read up more on how that keyword works 😉
Thanks again
Regards
Edvard