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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Userpath77
Helper II
Helper II

Need help adding unique values across multiple columns

Hi All

 

I have a table like below that has 5 columns and each row has a unique combination (Fund, Item, Line, Year). I need a dax formula that will look at an entire table and sum the amounts for each unique combination (ex: Fund: Amex, Item: 2, Line: 2020, Year: 2023). My real dataset has a few thousand rows.

 

Can anyone help with this?

FUNDITEMLINEYEARAMOUNT
AMEX22020202215000
CAP11954202212000
AMEX2202020227000
CAP119542023900
AMEX22020202310000
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Userpath77 ,

Below is my table:

vxiandatmsft_0-1701051839825.png

The following DAX might work for you:

Measure = 
     CALCULATE(
        SUM('Table'[Amount]),
        ALLEXCEPT('Table','Table'[Line])
    )

The final output is shown in the following figure:

vxiandatmsft_1-1701051875568.png

Best Regards,

Xianda Tang

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

7 REPLIES 7
Anonymous
Not applicable

Hi @Userpath77 ,

Below is my table:

vxiandatmsft_0-1701051839825.png

The following DAX might work for you:

Measure = 
     CALCULATE(
        SUM('Table'[Amount]),
        ALLEXCEPT('Table','Table'[Line])
    )

The final output is shown in the following figure:

vxiandatmsft_1-1701051875568.png

Best Regards,

Xianda Tang

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

Userpath77
Helper II
Helper II

Thanks but what I need is somthing that will find and add each combination. As an example, since both Amex Lines have the same values for fund, item, line, year, the measure should show 1 total that equals both lines. I need that type of formula that will find matching combinations like decribed above and total them.

 

please put what output you nedd from above data you provide

Userpath77
Helper II
Helper II

Hello Dangar, I need the actual measure

 

hi, @Userpath77 

try below

measure 6= sum('tablename'[amount])

 

Dangar332_0-1699472950630.png

 

Userpath77
Helper II
Helper II

Updated to show better picture of table

 

Userpath77_0-1699470140851.png

 

hi, @Userpath77 
you want seprate table or measure?

Dangar332_0-1699471973914.png

 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.