Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
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
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
Pls advise. Thank you very much
Warm Regards
Solved! Go to Solution.
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
Create a new table
Table 2 = {"Daily","Monthly","Financial Year"}
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
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 @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
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 Albert,
Superb, thank you. I dont have words. amazed.
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
Create a new table
Table 2 = {"Daily","Monthly","Financial Year"}
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
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
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
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