Forum Discussion
Victormar
Helper V
3 years agoCreating new table adding a custom column to summarize
Hi again community,
I've been trying for a while to create a new table from some existing columns that I have, but also adding a column manually, and I haven't been able too.
I have tried with s...
- 3 years ago
Hi Victormar ,
Please try:
Table = UNION ( SUMMARIZECOLUMNS ( 'DIM_Chassis', "Name",("Mileage"), "OK", COUNT ( DIM_Chassis[c_MileageLateastIsDeviatedGreen] ), "Over", COUNT ( DIM_Chassis[c_MileageLateastIsDeviatedRed] ), "Below", COUNT ( DIM_Chassis[c_MileageLateastIsDeviatedYellow] ) ), SUMMARIZECOLUMNS ( 'DIM_Chassis', "Name",("Speed"), "OK", COUNT ( DIM_Chassis[c_SpeedLateastIsDeviatedGreen] ), "Over", COUNT ( DIM_Chassis[c_SpeedLateastIsDeviatedRed] ), "Below", COUNT ( DIM_Chassis[c_SpeedLateastIsDeviatedYellow] ) ), SUMMARIZECOLUMNS ( 'DIM_Chassis', "Name",("EnergyConsumption"), "OK", COUNT ( DIM_Chassis[c_EnergyConsumptionLateastIsDeviatedGreen] ), "Over", COUNT ( DIM_Chassis[c_EnergyConsumptionLateastIsDeviatedRed] ), "Below", COUNT ( DIM_Chassis[c_EnergyConsumptionLateastIsDeviatedYellow] ) ) )Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-jianboli-msft
Community Support
3 years agoHi Victormar ,
Please try:
Table =
UNION (
SUMMARIZECOLUMNS (
'DIM_Chassis',
"Name",("Mileage"),
"OK", COUNT ( DIM_Chassis[c_MileageLateastIsDeviatedGreen] ),
"Over", COUNT ( DIM_Chassis[c_MileageLateastIsDeviatedRed] ),
"Below", COUNT ( DIM_Chassis[c_MileageLateastIsDeviatedYellow] )
),
SUMMARIZECOLUMNS (
'DIM_Chassis',
"Name",("Speed"),
"OK", COUNT ( DIM_Chassis[c_SpeedLateastIsDeviatedGreen] ),
"Over", COUNT ( DIM_Chassis[c_SpeedLateastIsDeviatedRed] ),
"Below", COUNT ( DIM_Chassis[c_SpeedLateastIsDeviatedYellow] )
),
SUMMARIZECOLUMNS (
'DIM_Chassis',
"Name",("EnergyConsumption"),
"OK", COUNT ( DIM_Chassis[c_EnergyConsumptionLateastIsDeviatedGreen] ),
"Over", COUNT ( DIM_Chassis[c_EnergyConsumptionLateastIsDeviatedRed] ),
"Below", COUNT ( DIM_Chassis[c_EnergyConsumptionLateastIsDeviatedYellow] )
)
)
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Victormar3 years ago
Helper V
Hello!
Thanks for the reply, it works! I am wondering now how can I relate that to the fleet_id that I have in another table.
I see that this way I have a table that summarizes the numbers, but cannot use it to be filtered.
Is there any way to connect it to the other table with fleet_id?
Thanks in advance!