Forum Discussion
Creating new table adding a custom column to summarize
- 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.
Hi Victormar ,
Have you considered creating a relationship between the two tables?
Besides, this question is beyond the topic at the beginning of this thread. If this advice doesn't work, please consider about mark the answer to this post as a solution and create a new thread about the new issue, which will better help other users.
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.
Hello, and thanks again for your answer.
You are right. Although as an extension it might be worth it to take it here, not to spam again with the explanation?
v-jianboli-msft , How would you link the tables though, I was trying in the meantime to add the fleet_id to the table, but didn't succeed, since SUMMARIZECOLUMNS doesn't allow it.
Cheers!