Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi!
Could someone please help me find the best way to solve this problem. I don't know if it's more convenient to do it by script or by expression.
My data set is:
The objective is to complete for item 3 the data of the attribute1 and attribute2 fields with the same information that the other items have. Then the user will be able to filter by attribute1 or attribute 2 and will not lose the record with item_p 3
Regards.-
does this mean there is some hierarchy to the items? that items 1 and 2 belong to item3? this should be modeled in your DM, that there should be some attribute that says item 3 is the parent of 1 and 2. so add a field , Relationship for example, where items 1 and 2 are children and item 3 is parent, you can create a table with the following measure:
if(Relationship='parent', aggr(nodistinct concat(distinct attr1),id_p), only(attr1))
sample data:
this means if item is a parent, aggregate the attribute column and apparently, since there is only one value for attr1 for all the children, the aggregation will return attr1 for the children, else return the attr1 which isnt aggregated.
this assumes that the children will always have the same attr1
Edwin, thanks for your answer. I was testing the expression and I find the following problem. When I filter "door" or "Window" the parent row is lost
The objective of completing this data is to be able to filter and not lose the parent row.