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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
mamedoff_korea
Regular Visitor

How to add a drop down selection to the Total annual amount

I have a table with 12 rows for months that show the total sales amount for that month

each month also have a drop down menu with three sections that show 3 diferent product groups with the relevant sales amount.

Below the table is of course the Total number for that year which shows the total sales for all product groups for a whole year

 

what I want to do is to add similar three product groups below the Total so I can see the annual total for each of the three A, B , C product group. Each of them will show the sales amount for the 12 months.

 

How do I add that drop down menu below the Total?

1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

Hi  @mamedoff_korea ,

 

Are you referring to the creation of a column below the Visual Total row to view the information, according to the design of Power BI can not be achieved for the time being, but you can consider the creation of a new table to carry out the operation of the Union, in the row above the Total row to add the information.

vyangliumsft_0-1694416543175.png

 

Here are the steps you can follow:

1. Create calculated table.

Table2 =
VAR _table1 =
    SUMMARIZE (
        'Table',
        'Table'[Date],
        'Table'[Group],
        "Value",
            DIVIDE (
                SUMX (
                    FILTER (
                        ALL ( 'Table' ),
                        YEAR ( 'Table'[Date] ) = YEAR ( EARLIER ( 'Table'[Date] ) )
                            && 'Table'[Group] = EARLIER ( 'Table'[Group] )
                    ),
                    [Value]
                ),
                COUNTX (
                    FILTER (
                        ALL ( 'Table' ),
                        YEAR ( 'Table'[Date] ) = YEAR ( EARLIER ( 'Table'[Date] ) )
                            && 'Table'[Group] = EARLIER ( 'Table'[Group] )
                            && 'Table'[Month] = [Month]
                    ),
                    [Value]
                )
            ),
        "Month", "Year_Value"
    )
VAR _table2 =
    UNION ( 'Table', _table1 )
RETURN
    _table2

vyangliumsft_1-1694416543177.png

2. Create calculated column.

Rank =
IF (
    [Month] <> "Year_Value",
    VALUE ( 'Table2'[Month] ),
    COUNTX ( ALL ( 'Table2' ), [Value] )
)

vyangliumsft_2-1694416596219.png

3. Create calculated table.

Table3 =
SUMMARIZE ( 'Table2', 'Table2'[Month], 'Table2'[Rank] )

4. Connecting the relationship between two tables.

vyangliumsft_3-1694416596221.png

5. Select Table3[Month] – Column tools – Sort by column – [Rank].

vyangliumsft_4-1694416659551.png

6. Result:

vyangliumsft_5-1694416659559.png

 

 

Best Regards,

Liu Yang

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

1 REPLY 1
v-yangliu-msft
Community Support
Community Support

Hi  @mamedoff_korea ,

 

Are you referring to the creation of a column below the Visual Total row to view the information, according to the design of Power BI can not be achieved for the time being, but you can consider the creation of a new table to carry out the operation of the Union, in the row above the Total row to add the information.

vyangliumsft_0-1694416543175.png

 

Here are the steps you can follow:

1. Create calculated table.

Table2 =
VAR _table1 =
    SUMMARIZE (
        'Table',
        'Table'[Date],
        'Table'[Group],
        "Value",
            DIVIDE (
                SUMX (
                    FILTER (
                        ALL ( 'Table' ),
                        YEAR ( 'Table'[Date] ) = YEAR ( EARLIER ( 'Table'[Date] ) )
                            && 'Table'[Group] = EARLIER ( 'Table'[Group] )
                    ),
                    [Value]
                ),
                COUNTX (
                    FILTER (
                        ALL ( 'Table' ),
                        YEAR ( 'Table'[Date] ) = YEAR ( EARLIER ( 'Table'[Date] ) )
                            && 'Table'[Group] = EARLIER ( 'Table'[Group] )
                            && 'Table'[Month] = [Month]
                    ),
                    [Value]
                )
            ),
        "Month", "Year_Value"
    )
VAR _table2 =
    UNION ( 'Table', _table1 )
RETURN
    _table2

vyangliumsft_1-1694416543177.png

2. Create calculated column.

Rank =
IF (
    [Month] <> "Year_Value",
    VALUE ( 'Table2'[Month] ),
    COUNTX ( ALL ( 'Table2' ), [Value] )
)

vyangliumsft_2-1694416596219.png

3. Create calculated table.

Table3 =
SUMMARIZE ( 'Table2', 'Table2'[Month], 'Table2'[Rank] )

4. Connecting the relationship between two tables.

vyangliumsft_3-1694416596221.png

5. Select Table3[Month] – Column tools – Sort by column – [Rank].

vyangliumsft_4-1694416659551.png

6. Result:

vyangliumsft_5-1694416659559.png

 

 

Best Regards,

Liu Yang

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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