Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
santoshlearner2
Resolver I
Resolver I

Multiy Switch Button- Is it possible

Dear All,

I have made a switch button, basically if i click on any buttong it will give be daily/ monthly values  in the table A

Table A

santoshlearner2_0-1723148188793.png

But say to these two categories viz category and sales on that day, can i add 4 more columns

Addln Column 

1) Highest sales by a store ( With the name and amt)

2)  Then sales of Store with their respective amt named mumbai/ goa/ France,

Pls refer table below, It such thing possible. Pls advise. Thank you very much 

santoshlearner2_1-1723148409238.png

 

Pls advise. Thank you very much 

 

Warm Regards

3 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Hi @santoshlearner2 ,
According to your description, you want to create buttons and follow the button options for the data. This is more like the case with Slicer, where you can use the new slicer's button style to do this and use switch in the measure to make the selection. Since I don't know what your data structure looks like, the following is just test data that you can apply to your data.
Sample data

vheqmsft_0-1723169497275.png

Create a new table

Table 2 = {"Daily","Monthly","Financial Year"}

vheqmsft_1-1723169515295.png
Create mesaures

Sales on that day = 
SWITCH(
    TRUE(),
    SELECTEDVALUE('Table 2'[Value]) = "Daily",
    SUM('Table'[Daily Sales]),
    SELECTEDVALUE('Table 2'[Value]) = "Monthly",
    SUM('Table'[Monthly Sales]),
    SELECTEDVALUE('Table 2'[Value]) = "Financial Year",
    SUM('Table'[Financial Year Sales])
)
Highest sales by Store = 
SWITCH(
    TRUE(),
    SELECTEDVALUE('Table 2'[Value]) = "Daily",
    MAX('Table'[Daily Sales]),
    SELECTEDVALUE('Table 2'[Value]) = "Monthly",
    MAX('Table'[Monthly Sales]),
    SELECTEDVALUE('Table 2'[Value]) = "Financial Year",
    MAX('Table'[Financial Year Sales])
)
Mumbai = 
SWITCH(
    TRUE(),
    SELECTEDVALUE('Table 2'[Value]) = "Daily",
    CALCULATE(
        SUM('Table'[Daily Sales]),
        FILTER(
            'Table',
            'Table'[Store] = "Mumbai"
        )
    ),
    SELECTEDVALUE('Table 2'[Value]) = "Monthly",
    CALCULATE(
        SUM('Table'[Monthly Sales]),
        FILTER(
            'Table',
            'Table'[Store] = "Mumbai"
        )
    ),
    SELECTEDVALUE('Table 2'[Value]) = "Financial Year",
    CALCULATE(
        SUM('Table'[Financial Year Sales]),
        FILTER(
            'Table',
            'Table'[Store] = "Mumbai"
        )
    )
)
Goa = 
SWITCH(
    TRUE(),
    SELECTEDVALUE('Table 2'[Value]) = "Daily",
    CALCULATE(
        SUM('Table'[Daily Sales]),
        FILTER(
            'Table',
            'Table'[Store] = "Goa"
        )
    ),
    SELECTEDVALUE('Table 2'[Value]) = "Monthly",
    CALCULATE(
        SUM('Table'[Monthly Sales]),
        FILTER(
            'Table',
            'Table'[Store] = "Goa"
        )
    ),
    SELECTEDVALUE('Table 2'[Value]) = "Financial Year",
    CALCULATE(
        SUM('Table'[Financial Year Sales]),
        FILTER(
            'Table',
            'Table'[Store] = "Goa"
        )
    )
)
France = 
SWITCH(
    TRUE(),
    SELECTEDVALUE('Table 2'[Value]) = "Daily",
    CALCULATE(
        SUM('Table'[Daily Sales]),
        FILTER(
            'Table',
            'Table'[Store] = "France"
        )
    ),
    SELECTEDVALUE('Table 2'[Value]) = "Monthly",
    CALCULATE(
        SUM('Table'[Monthly Sales]),
        FILTER(
            'Table',
            'Table'[Store] = "France"
        )
    ),
    SELECTEDVALUE('Table 2'[Value]) = "Financial Year",
    CALCULATE(
        SUM('Table'[Financial Year Sales]),
        FILTER(
            'Table',
            'Table'[Store] = "France"
        )
    )
)

Final output

vheqmsft_2-1723169608249.png

 

Best regards,
Albert He


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

 

 

View solution in original post

Hi,

 

Superb Superb of you, to reply fantastic.  You are simply superb

View solution in original post

Anonymous
Not applicable

Hi @santoshlearner2 ,
Create another measure and apply to the card visual

Highest Store = 
SWITCH(
    TRUE(),
    SELECTEDVALUE('Table 2'[Value]) = "Daily",
    CALCULATE(
        MAX('Table'[Store]),
        FILTER(
            'Table',
            'Table'[Daily Sales] = MAX('Table'[Daily Sales])
        )
    ),
    SELECTEDVALUE('Table 2'[Value]) = "Monthly",
    CALCULATE(
        MAX('Table'[Store]),
        FILTER(
            'Table',
            'Table'[Monthly Sales] = MAX('Table'[Monthly Sales])
        )
    ),
    SELECTEDVALUE('Table 2'[Value]) = "Financial Year",
   CALCULATE(
        MAX('Table'[Store]),
        FILTER(
            'Table',
            'Table'[Financial Year Sales] = MAX('Table'[Financial Year Sales])
        )
    )
)

Final output

vheqmsft_0-1723511805691.png

Best regards,
Albert He


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

 

View solution in original post

5 REPLIES 5
santoshlearner2
Resolver I
Resolver I

Hi Albert,

 

Superb, thank you. I dont have words. amazed.

Anonymous
Not applicable

Hi @santoshlearner2 ,
According to your description, you want to create buttons and follow the button options for the data. This is more like the case with Slicer, where you can use the new slicer's button style to do this and use switch in the measure to make the selection. Since I don't know what your data structure looks like, the following is just test data that you can apply to your data.
Sample data

vheqmsft_0-1723169497275.png

Create a new table

Table 2 = {"Daily","Monthly","Financial Year"}

vheqmsft_1-1723169515295.png
Create mesaures

Sales on that day = 
SWITCH(
    TRUE(),
    SELECTEDVALUE('Table 2'[Value]) = "Daily",
    SUM('Table'[Daily Sales]),
    SELECTEDVALUE('Table 2'[Value]) = "Monthly",
    SUM('Table'[Monthly Sales]),
    SELECTEDVALUE('Table 2'[Value]) = "Financial Year",
    SUM('Table'[Financial Year Sales])
)
Highest sales by Store = 
SWITCH(
    TRUE(),
    SELECTEDVALUE('Table 2'[Value]) = "Daily",
    MAX('Table'[Daily Sales]),
    SELECTEDVALUE('Table 2'[Value]) = "Monthly",
    MAX('Table'[Monthly Sales]),
    SELECTEDVALUE('Table 2'[Value]) = "Financial Year",
    MAX('Table'[Financial Year Sales])
)
Mumbai = 
SWITCH(
    TRUE(),
    SELECTEDVALUE('Table 2'[Value]) = "Daily",
    CALCULATE(
        SUM('Table'[Daily Sales]),
        FILTER(
            'Table',
            'Table'[Store] = "Mumbai"
        )
    ),
    SELECTEDVALUE('Table 2'[Value]) = "Monthly",
    CALCULATE(
        SUM('Table'[Monthly Sales]),
        FILTER(
            'Table',
            'Table'[Store] = "Mumbai"
        )
    ),
    SELECTEDVALUE('Table 2'[Value]) = "Financial Year",
    CALCULATE(
        SUM('Table'[Financial Year Sales]),
        FILTER(
            'Table',
            'Table'[Store] = "Mumbai"
        )
    )
)
Goa = 
SWITCH(
    TRUE(),
    SELECTEDVALUE('Table 2'[Value]) = "Daily",
    CALCULATE(
        SUM('Table'[Daily Sales]),
        FILTER(
            'Table',
            'Table'[Store] = "Goa"
        )
    ),
    SELECTEDVALUE('Table 2'[Value]) = "Monthly",
    CALCULATE(
        SUM('Table'[Monthly Sales]),
        FILTER(
            'Table',
            'Table'[Store] = "Goa"
        )
    ),
    SELECTEDVALUE('Table 2'[Value]) = "Financial Year",
    CALCULATE(
        SUM('Table'[Financial Year Sales]),
        FILTER(
            'Table',
            'Table'[Store] = "Goa"
        )
    )
)
France = 
SWITCH(
    TRUE(),
    SELECTEDVALUE('Table 2'[Value]) = "Daily",
    CALCULATE(
        SUM('Table'[Daily Sales]),
        FILTER(
            'Table',
            'Table'[Store] = "France"
        )
    ),
    SELECTEDVALUE('Table 2'[Value]) = "Monthly",
    CALCULATE(
        SUM('Table'[Monthly Sales]),
        FILTER(
            'Table',
            'Table'[Store] = "France"
        )
    ),
    SELECTEDVALUE('Table 2'[Value]) = "Financial Year",
    CALCULATE(
        SUM('Table'[Financial Year Sales]),
        FILTER(
            'Table',
            'Table'[Store] = "France"
        )
    )
)

Final output

vheqmsft_2-1723169608249.png

 

Best regards,
Albert He


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

 

 

Hi,

 

One last request how to get the name of the highest store with the respective amount for monthly / daily and financial year 

Anonymous
Not applicable

Hi @santoshlearner2 ,
Create another measure and apply to the card visual

Highest Store = 
SWITCH(
    TRUE(),
    SELECTEDVALUE('Table 2'[Value]) = "Daily",
    CALCULATE(
        MAX('Table'[Store]),
        FILTER(
            'Table',
            'Table'[Daily Sales] = MAX('Table'[Daily Sales])
        )
    ),
    SELECTEDVALUE('Table 2'[Value]) = "Monthly",
    CALCULATE(
        MAX('Table'[Store]),
        FILTER(
            'Table',
            'Table'[Monthly Sales] = MAX('Table'[Monthly Sales])
        )
    ),
    SELECTEDVALUE('Table 2'[Value]) = "Financial Year",
   CALCULATE(
        MAX('Table'[Store]),
        FILTER(
            'Table',
            'Table'[Financial Year Sales] = MAX('Table'[Financial Year Sales])
        )
    )
)

Final output

vheqmsft_0-1723511805691.png

Best regards,
Albert He


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

 

Hi,

 

Superb Superb of you, to reply fantastic.  You are simply superb

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.