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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Marco_Antonio
New Member

How I can create new lines that sumarize others lines and shows in my report as lines

I've created a dashboar as the next image show it, and I need to create new lines that show the result Sales - SVC  and after that Its show into report but as lines bellow these lines as result.

I looked for differents website but all show how created new measure or calculate information, but I didn't the right answer to my problem.
Thanks in advance.

 

Marco_Antonio_0-1653058356889.png

 

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

Hi @Marco_Antonio ,

Pls test the below dax to create a new column:

Table 2 =
UNION (
    SUMMARIZE (
        'Table',
        'Table'[Quarter],
        'Table'[Month],
        "Type1", "SALE-Svc",
        "Type2", "  ",
        "value",
            CALCULATE (
                SUM ( 'Table'[value] ),
                FILTER (
                    ALL ( 'Table' ),
                    'Table'[Quarter] = MAX ( 'Table'[Quarter] )
                        && 'Table'[Month] = MAX ( 'Table'[Month] )
                        && 'Table'[Type1] = "Sales"
                )
            )
                - CALCULATE (
                    SUM ( 'Table'[value] ),
                    FILTER (
                        ALL ( 'Table' ),
                        'Table'[Quarter] = MAX ( 'Table'[Quarter] )
                            && 'Table'[Month] = MAX ( 'Table'[Month] )
                            && 'Table'[Type1] = "Svc"
                    )
                )
    ),
    'Table'
)

 

before:

vluwangmsft_0-1653376016325.png

 

after:

vluwangmsft_1-1653376024365.png

 

Did I answer your question? Mark my post as a solution!


Best Regards

Lucien

 

View solution in original post

3 REPLIES 3
Marco_Antonio
New Member

Thanks, I am trying to aplied your answer but I cannot do yet I am with a lot of work right now and this question it for a new proyect and proposal to my bosses.

But sound logic and good, thanks for your time.

v-luwang-msft
Community Support
Community Support

Hi @Marco_Antonio ,

Pls test the below dax to create a new column:

Table 2 =
UNION (
    SUMMARIZE (
        'Table',
        'Table'[Quarter],
        'Table'[Month],
        "Type1", "SALE-Svc",
        "Type2", "  ",
        "value",
            CALCULATE (
                SUM ( 'Table'[value] ),
                FILTER (
                    ALL ( 'Table' ),
                    'Table'[Quarter] = MAX ( 'Table'[Quarter] )
                        && 'Table'[Month] = MAX ( 'Table'[Month] )
                        && 'Table'[Type1] = "Sales"
                )
            )
                - CALCULATE (
                    SUM ( 'Table'[value] ),
                    FILTER (
                        ALL ( 'Table' ),
                        'Table'[Quarter] = MAX ( 'Table'[Quarter] )
                            && 'Table'[Month] = MAX ( 'Table'[Month] )
                            && 'Table'[Type1] = "Svc"
                    )
                )
    ),
    'Table'
)

 

before:

vluwangmsft_0-1653376016325.png

 

after:

vluwangmsft_1-1653376024365.png

 

Did I answer your question? Mark my post as a solution!


Best Regards

Lucien

 

d_gosbell
Super User
Super User

You could maybe look at an approach like this one https://www.sqlbi.com/blog/alberto/2011/03/01/powerpivot-parent-child-and-unary-operators/ to make the grand total level show the value for Sales - Svc

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.