Forum Discussion
Paginated Report Help - Pullng in multiple distinct values from a table using an Expression
Good morning, all! I have inherited a Paginated Report that is giving me fits due to it not pulling in all needed data in an Expression. When the Expression looks at the data, it will ignore the NULL values (good), but will only pull in the first non-NULL value, ignoring any other values that may be available (bad). Here is an example of values to pull in:
Here is the code in the Expression:
IIf(Fields!min_width.Value<Lookup(Fields!I3_Coil_Id_str.Value,Fields!MATERIAL_ID.Value,Fields!slab_width_tail.Value,"testSQL") and
Fields!max_width.Value>=Lookup(Fields!I3_Coil_Id_str.Value,Fields!MATERIAL_ID.Value,Fields!slab_width_tail.Value,"testSQL") ,
Fields!order_instructions.Value , "")
I'm still fairly new to the Power BI world, but know that the way the code is written, it's only going to grab the first non-NULL value available, display it, and ignore any subsequent values.
My question is: How do I rewrite the code to grab all available non-NULL values, while ignoring duplicate values that may appear as it does its search?
Thank you in advance for any help provided!
1 Reply
- AnonymousNot applicable
Hi SAS_BI
In order to help you better, would it be convenient for you to provide the file? Please remove any sensitive data in advance.
My current suggestion is that if the correspondence between your fields is one-to-many, you could try using the lookupset or mutillookup functions.
Best Regards,
Yulia XuIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.