question

Nicolas Mbz avatar image
0 Likes"
Nicolas Mbz asked Nicolas Mbz commented

Is possible to get this result in a Calulated Table ?

Hi !

From this :


1661247933888.png


I would like a result like this :

1661248115059.png



I'm only able to make that :


1661248198373.png


Is there a way ? :)

Thanks in advance

FlexSim 22.1.0
sqlcalculated table
1661247933888.png (67.5 KiB)
1661248115059.png (15.7 KiB)
1661248198373.png (80.4 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

·
Felix Möhlmann avatar image
1 Like"
Felix Möhlmann answered Nicolas Mbz commented

The four "Statut" columns can be set up through the "Count specific value in column" under "Aggregations". The "Total" column with "Basic aggregation of column" that counts the rows of the "FluxNom" column.

1661252257677.png

To get the "Total" row, set up a subset for each value of "FluxNom" and one all encompassing subset "Total" (no filters).

1661252428580.png

1661252448354.png


You can also achieve this wihtout having to set up a subset for each FluxNom value by manually editing the query. All existing values are aggregated in a single statement with the GROUP BY clause and the "Total" row is added onto the table with UNION ALL (which the subsets use).

1661252660462.png

This does have the disadvanted however that value of FluxNom that do not have a row (yet) will not appear in the result table, whereas using the subsets allows for empty rows.


1661252257677.png (36.0 KiB)
1661252428580.png (16.0 KiB)
1661252448354.png (5.8 KiB)
1661252660462.png (43.3 KiB)
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Nicolas Mbz avatar image Nicolas Mbz commented ·
perfect ! Thanks a lot !
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.