Skip to main content
Announcements
Join us on Sept. 17 to hear how our new GenAI Assistant empowers data professionals: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
kwl1234
Partner - Contributor III
Partner - Contributor III

Data range in set analysis?

I try to filter the data by material No. list.

Material No list required:

kwl1234_0-1615187941184.png

Now, I using set analysis with hard coding to get the material No =30812* to 30815*

Sum({<[Material]={"30812*","30813*","30814*","30815*"} >}
[Value]))

I tried set number range on set analysis, but it seems not correct.

kwl1234_1-1615188035237.png

Here is the expression I tried to use to filter data by material no. list.

Sum({<[Material]={">=$(=Fm_Material_No)<=$(=To_Material_No)"} >} [Value])

but it got wrong value. How do I set the expression to perform same way on like this expression(Sum({<[Material]={"30812*","30813*","30814*","30815*"} >}
[Value])) )?

 

 

 

 

Labels (1)
  • SaaS

1 Solution

Accepted Solutions
marcus_sommer

To be able to apply a numeric comparison the values need to be numeric. In your case you may use dual-values for it, maybe in this way:

dual([Material], num#(keepchar([Material], '0123456789'))) as [Material]

Beside this I think it would be beneficial to use a hierarchy of the [Material] which may already exists and if not you could create it with subfield(), like:

subfield([Material], '_', 1) as [Material Main],
subfield([Material], '_', 2) as [Material MainSub],
subfield([Material], '_', 3) as [Material Detail],

and with [Material Main] you could also apply the showed >= <= logic.

- Marcus

View solution in original post

1 Reply
marcus_sommer

To be able to apply a numeric comparison the values need to be numeric. In your case you may use dual-values for it, maybe in this way:

dual([Material], num#(keepchar([Material], '0123456789'))) as [Material]

Beside this I think it would be beneficial to use a hierarchy of the [Material] which may already exists and if not you could create it with subfield(), like:

subfield([Material], '_', 1) as [Material Main],
subfield([Material], '_', 2) as [Material MainSub],
subfield([Material], '_', 3) as [Material Detail],

and with [Material Main] you could also apply the showed >= <= logic.

- Marcus