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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Chris123Terr
Frequent Visitor

Why when I create a table with summarize I can't add the values ​​of a column?

Hello good. Do you know why when I use addcolumns and summarize, I can't do a grouped sum (that is, apply summarize again) on the result column of the first summarize?

Chris123Terr_0-1677099016789.png

In short, what I want is to be able to sum the values ​​in the result column ("result" column), but to do so by grouping by category.

1 REPLY 1
v-rzhou-msft
Community Support
Community Support

Hi @Chris123Terr ,

 

My Sample is as below.

RicoZhou_0-1677567877535.png

Data Model:

RicoZhou_1-1677567894941.png

Code:

Table 2 =
VAR TABLA1 =
    ADDCOLUMNS (
        SUMMARIZE (
            FACT_TABLE,
            DIM_PRODCATEGORY[ProductCategory],
            DIM_CALENDARIO[MONTH_TEXT_SHORT]
        ),
        "SUMA",
            CALCULATE (
                DISTINCTCOUNT ( FACT_TABLE[SalesQuantity] ),
                FILTER (
                    FACT_TABLE,
                    FACT_TABLE[ProductCategory] = EARLIER ( [ProductCategory] )
                )
            )
    )
RETURN
    TABLA1

Result is as below.

RicoZhou_2-1677567939129.png

 

Best Regards,
Rico Zhou

 

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

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.