Forum Discussion

Victormar's avatar
Victormar
Helper V
3 years ago
Solved

Creating 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...
  • v-jianboli-msft's avatar
    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.