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

Creating dimension based on the variable output

Hi All,

I am creating an assessment for our suppliers.

iv'e created a flag for lines that were delivered on time, 'OTD_Flag'

then made a set expression:

count({<OTD_Flag = {'1','0'},Supplied_and_Delivered={'1'}>}distinct Key_PurchOrderLineID_Company)

and finally i created an vOTD_Score - $(vDeliveredOnTime)/ $(vDeliveredLines) for each supplier.

so i have now a variable vOTD_Score that gets values between 0 and 1.

now i want to create groups and use them as filter,

for example i want to filter (using a simple filter pane) all of the suppliers that the OTD Score is between 0.85-1

i tried to do by defining a dimension in the master items but with no success..

 

is that possible?

Thank you helpers 🙂

1 Solution

Accepted Solutions
sunny_talwar

Try this

Aggr(
    If($(vOTDScore) > 0.85, '0.85-1')
, SupplierField)

View solution in original post

6 Replies
sunny_talwar

What expression did you try for your master dimension?

roisolberg
Creator
Creator
Author

Hi Sunny

 

even when i do it in the most simple way it does not work

i tried:

if($(vOTDScore)>0.85,'0.85-1')    - Invalid Dimension

if((vOTDScore)>0.85,'0.85-1')   - Get only blanks
//if($(vOTDScore)=1,1,0)    - Invalid Dimension
//if((vOTDScore)=1,1,0)    -  all 0

sunny_talwar

Try this

Aggr(
    If($(vOTDScore) > 0.85, '0.85-1')
, SupplierField)
roisolberg
Creator
Creator
Author

Thank you @sunny_talwar !  It works great.

 

Maybe on the way you could answer one more question for me..

it is not exactly related but on the same variable matter, iv'e created a bar chart with 3 variables  as shown in the pic below:

1.JPG

is it possible to make each bar with a different color by the variable?

 

Thanks

 

 

sunny_talwar

It might be possible, but difficult to give you exact expression without playing around with it a little bit

roisolberg
Creator
Creator
Author

OK,

but maybe you can just point on the direction i should try to play with?