Forum Discussion

MigWare's avatar
MigWare
Icon for Helper I rankHelper I
6 years ago
Solved

Aggregate and calculate two different columns

Hi,   I´ve two columns, material type and sales data. I need to show all the sales data that falls under material type X, Z, Y and material type A, B, C and R and so on...... basically i need to ag...
  • v-gizhi-msft's avatar
    v-gizhi-msft
    6 years ago

    Hi,

     

    You can easily add other new custom category to the original formula by IF function, like this:

    New_Category =
    IF (
        'Table'[Category]
            IN { "Hi-Energy GNA 98", "SPB95 Hi-Energy", "SPB98 Hi-Energy" },
        "Petrol",
        IF ( 'Table'[Category] IN { "A", "B", "C" }, "Gas", 'Table'[Category] )
    )

     

    Best Regards,

    Giotto