Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
i have a date table like this
Id | usuario | txt |
12 | usr1 | prueba1 |
534 | usr2 | prueba1 |
34 | usr3 | prueba1 |
3 | usr4 | prueba3 |
26 | usr5 | prueba2 |
i have created a table graph with the field Txt like dimension field, and a expresion to count the diferents txt fileds Count(distint Id), but
also i want to see in each row of the table the first value of the field id and usuario, i try the expresion first(id) but it don't return anything.
Somebody know how to show ony the first value of this field (id) for each each row.???
i have attached and excample
thanks in advance for your help
best regards
dcd
Yes, we need some key field to identify the load order. That is the reason I suggested to modify the load script (RecNo or FirstValue syntax) else I would have suggested some expression (as he was not clearly mentioned his requirement. I thought he wants to show first value (he mentioned in subject line as first value) from the excel). RecNo() (Not Rowno()) works fine in the above cases. Anyways, he is happy with your solution.
Hi dcd,
Can you please share the output you are expecting ?
Regards
KC
May be this:
Expression1:
SubField(Aggr(Concat(DISTINCT usuario, '|'), txt), '|', 1)
Expression2:
SubField(Aggr(Concat(DISTINCT Id, '|'), txt), '|', 1)
Nice logic sunny
Thank you
Hello
this result with is valid for us, showing the first value of userid and id for each txt value, but we need do this in the expresion of the table graph not in the load script.
txt | count(DISTINCT Id) | usuario | Id |
prueba1 | 5 | usr1 | 12 |
prueba2 | 1 | usr5 | 26 |
prueba3 | 2 | usr4 | 3 |
prueba4 | 2 | usr7 | 5 |
If it is not possible extract the first value in the expresion of the graph, also is valid for us show only one value of usuario and id, for example to the text "prueba1", is valid for us show one of next rows:
usuario | Id |
usr1 | 12 |
usr2 | 534 |
usr3 | 34 |
usr8 | 323 |
usr10 | 444 |
only one value of usuario and id, linked with each value of txt.
thanks
regards
dcd
Great solution!!!
Tanks very much
Best Regards
dcd
No problem. I am glad I was able to help.
Best,
Sunny
Hi Sunny,
Can you check your expression against the below excel.
I am not sure about his requirement but this will produce the same output .
Data:
LOAD RecNo () as Rec,
Id,
usuario,
txt
FROM
(ooxml, embedded labels, table is Hoja1);
Expressions: FirstSortedValue(usuario,Rec)
FirstSortedValue(Id,Rec)