Forum Discussion
MigWare
Helper I
6 years agoAggregate 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...
- 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
MigWare
Helper I
6 years agoHi v-gizhi-msft,
Thanks, I had already figured that out and it worked however I´m just able to create one aggregation. So currently i´m aggregating 3 itens into one "Petrol" but i would need to aggregate the other 3 into another category "Gas". How is that possible?
Regards,
v-gizhi-msft
Community Support
6 years agoHi,
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