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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

CREATING NEW calculated row

Hello,

I would like to regroup all the Product Group name with VMS ( from 29.27- 29.39) such that it returns the line in red .

 

Best regards ,

Anis 

Product Group NameCOGS (OM) raw materialsCOGS (purchased third party)COGS (OM) packaging materials
02.67 NIN Functional Formulas148195 31096
02.99 Other infant products123212 1000
29.12 Devices-148187323467222
29.24 Vitaflo1342111709095166323705
29.25 Medical Nutrition8424456745312314123
29.26 Consumer Care21232312319584290411399941479
29.27 VMS - Garden of Life1232312323413421341324611675147
29.28 VMS - Professional4295982588134134138768236178859
29.29 VMS - Other12342341167525610723123
29.30 VMS - Wobenzym7481263875044740414680326
29.31 VMS - VP631029145134234132151221
29.32 VMS - Nuun2342788675712313
29.33 VMS Natures’s Bounty55932921698675 
29.34 VMS Solgar3423423123 
29.35 VMS Puritan’s Pride1473203499464567467 
29.36 VMS – Osteo Biflex34234614946 
29.37 VMS Private Label (CMO)34234213145074 
29.38 VMS – Sundown375380963123132 
29.39 VMS - TBCo Other2342342234234 
29.40 Pharma61635622559841743773174
29.41 VMHS – Orgain432365745343234 
29.99 Other HealthCare nutrition1759448737338812590483133085229
33.03 Pharmaceuticals13413423430393899 
33.04 Diagnostics28225418  
35.05 Maternal Nutrition WIN400002342342 
98.99 Unallocated12341234  
    
 SUM ALL VMS RAWSUM ALL VMS PURCHASED THIRDSUM ALL VMS PACK
CREATED ROW : TOTAL VMS1882708720423549767798245994720988,4
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

We cannot create calculated row directly, please refer to my pbix file to see if it helps you.

Create three measures.

package =
VAR _all =
    SUMX (
        FILTER (
            ALL ( 'Table' ),
            'Table'[Product] >= 29.27
                && 'Table'[Product] <= 29.39
        ),
        'Table'[COGS (OM) packaging materials]
    )
RETURN
    IF (
        HASONEVALUE ( 'Table'[Product] ),
        MAX ( 'Table'[COGS (OM) packaging materials] ),
        _all
    )
purchased =
VAR _all =
    SUMX (
        FILTER (
            ALL ( 'Table' ),
            'Table'[Product] >= 29.27
                && 'Table'[Product] <= 29.39
        ),
        'Table'[COGS (purchased third party)]
    )
RETURN
    IF (
        HASONEVALUE ( 'Table'[Product] ),
        MAX ( 'Table'[COGS (purchased third party)] ),
        _all
    )
raw =
VAR _all =
    SUMX (
        FILTER (
            ALL ( 'Table' ),
            'Table'[Product] >= 29.27
                && 'Table'[Product] <= 29.39
        ),
        'Table'[COGS (OM) raw materials]
    )
RETURN
    IF (
        HASONEVALUE ( 'Table'[Product] ),
        MAX ( 'Table'[COGS (OM) raw materials] ),
        _all
    )

vpollymsft_0-1655429662081.png

Best Regards

Community Support Team _ Polly

 

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

2 REPLIES 2
Anonymous
Not applicable

Thank you so much !

Anonymous
Not applicable

Hi @Anonymous ,

We cannot create calculated row directly, please refer to my pbix file to see if it helps you.

Create three measures.

package =
VAR _all =
    SUMX (
        FILTER (
            ALL ( 'Table' ),
            'Table'[Product] >= 29.27
                && 'Table'[Product] <= 29.39
        ),
        'Table'[COGS (OM) packaging materials]
    )
RETURN
    IF (
        HASONEVALUE ( 'Table'[Product] ),
        MAX ( 'Table'[COGS (OM) packaging materials] ),
        _all
    )
purchased =
VAR _all =
    SUMX (
        FILTER (
            ALL ( 'Table' ),
            'Table'[Product] >= 29.27
                && 'Table'[Product] <= 29.39
        ),
        'Table'[COGS (purchased third party)]
    )
RETURN
    IF (
        HASONEVALUE ( 'Table'[Product] ),
        MAX ( 'Table'[COGS (purchased third party)] ),
        _all
    )
raw =
VAR _all =
    SUMX (
        FILTER (
            ALL ( 'Table' ),
            'Table'[Product] >= 29.27
                && 'Table'[Product] <= 29.39
        ),
        'Table'[COGS (OM) raw materials]
    )
RETURN
    IF (
        HASONEVALUE ( 'Table'[Product] ),
        MAX ( 'Table'[COGS (OM) raw materials] ),
        _all
    )

vpollymsft_0-1655429662081.png

Best Regards

Community Support Team _ Polly

 

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

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.