Bug: Function Backed Pivot Table - Totals

I wrote this simple identical code in a Functions V1 code repo and a Functions V2 code repo. Like described in your Documentation

interface SalesData {
    region: string;
    year: string;
    productType?: string;
    values: {
        totalSales: Integer;
    }
};



    @Function()
    public testPivotExpandableNew(): SalesData[] {
        return [
            {
            "region": "NA",
            "year": "2021",
            "values": {
                "totalSales": 30000
            }
        },
            {
                "region": "NA",
                "year": "2021",
                "productType": "Clothing",
                "values": {
                    "totalSales": 90000
                }
            },
            {
                "region": "NA",
                "year": "2021",
                "productType": "Electronics",
                "values": {
                    "totalSales": 150000
                }
            },
            {
                "region": "NA",
                "year": "2021",
                "productType": "Furniture",
                "values": {
                    "totalSales": 60000
                }
            }
        ];
    }

The Function Published by the V1 repo renders the correct result while the V2 version wont show the totals:

Please let me know if I did something wrong here or if it’s really a bug.

Hi! Could you share the code for you v2 function? It looks like the value for the total group may be set explicitly as null rather than not be included.

Hi,

Thanks for your help in this matter.

I started a new V2 Functions repository, posted there again exactly the same code and then the issue was resolved.

Looks like it was/is an issue with older V2 Functions versions.

Ah okay good to know it’s no longer affecting – let use know if this comes up again!