cancel
Showing results for 
Search instead for 
Did you mean: 

Share of wallet

nikitabansal
8 - Cloud Apps
8 - Cloud Apps

Hello I am new to sisense and trying to achieve a very simple view 

My dashboard is being filtered for a selected brand (user can change this)  I would like to see the % contribution of this brand across it's category for example How much % sales did Adidas from all brands across sports category

My hierarchy goes as follows

shopping centre

category ex clothing, sports etc

Brand/Store ex adidas

Now I am using (sum(sales), category) formula here but for this I have to pre select my category where I want this to be dynamic based on the brand selection on dashboard level. Hope this makes sense. Any help would be appreciated thanks

1 ACCEPTED SOLUTION

harikm007
13 - Data Warehouse
13 - Data Warehouse

Hi @nikitabansal ,

You can use Blox to do this. Create a blox widget with Category and Brand as 'Items' and use below formula.

sum([Sales])/(sum([Sales]), all([Brand]))

harikm007_0-1659588695147.png

 

harikm007_1-1659588708858.png

Here is the Blox script I used for above widget

{
    "style": "",
    "script": "",
    "title": "",
    "showCarousel": true,
    "body": [
        {
            "spacing": "medium",
            "type": "Container",
            "items": [
                {
                    "spacing": "small",
                    "type": "TextBlock",
                    "text": "Percentage",
                    "color": "default",
                    "horizontalAlignment": "center"
                },
                {
                    "type": "TextBlock",
                    "text": "{panel:Percentage}",
                    "horizontalAlignment": "center",
                    "size": "extraLarge",
                    "style": {
                        "color": "#117899"
                    }
                }
            ]
        }
    ],
    "actions": []
}

 

-Hari

 

 

View solution in original post

1 REPLY 1

harikm007
13 - Data Warehouse
13 - Data Warehouse

Hi @nikitabansal ,

You can use Blox to do this. Create a blox widget with Category and Brand as 'Items' and use below formula.

sum([Sales])/(sum([Sales]), all([Brand]))

harikm007_0-1659588695147.png

 

harikm007_1-1659588708858.png

Here is the Blox script I used for above widget

{
    "style": "",
    "script": "",
    "title": "",
    "showCarousel": true,
    "body": [
        {
            "spacing": "medium",
            "type": "Container",
            "items": [
                {
                    "spacing": "small",
                    "type": "TextBlock",
                    "text": "Percentage",
                    "color": "default",
                    "horizontalAlignment": "center"
                },
                {
                    "type": "TextBlock",
                    "text": "{panel:Percentage}",
                    "horizontalAlignment": "center",
                    "size": "extraLarge",
                    "style": {
                        "color": "#117899"
                    }
                }
            ]
        }
    ],
    "actions": []
}

 

-Hari