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
manuelfigueira
Helper II
Helper II

Extract unique values from a table into another table

Hello Everyone,

 

I'm trying to extract the unique values onto a calculated table but seems doestn work my DAX? I was using count function but doest work as it's taken every value and also I need summarize those values, means, the table B below should be the final table.

 

I have Table A and I need to get table B by extracting the info from table A to table B taking into account only unique values of the invoice  column

 

Table A

 

InvoiceActualStandard
A2212050
A2215030
A2211040
B3344510
B3345040
B34539010

 

Table B

 

InvoiceActualStandard
A22180120
B3349550
B34539010

Thank you very much!

 

 

 

 

1 ACCEPTED SOLUTION
edhans
Super User
Super User

the following will return a table you want:

 

Summary Table = 
    SUMMARIZECOLUMNS(
        'Table'[Invoice],
        "Actual Total", SUM('Table'[Actual]),
        "Standard Total", SUM('Table'[Standard])
    )

 



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

3 REPLIES 3
edhans
Super User
Super User

the following will return a table you want:

 

Summary Table = 
    SUMMARIZECOLUMNS(
        'Table'[Invoice],
        "Actual Total", SUM('Table'[Actual]),
        "Standard Total", SUM('Table'[Standard])
    )

 



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Hi Edhans,

 

This works perfectly well! Thanks a lot!! You're a genius

 

Enjoy your day!


@manuelfigueira wrote:

You're a genius

Ha! No.

 

Coincidenally earlier this week I was working on a similar project and it took me about an hour to get a measure working right for me, and one of the components was a similar use of the SUMMARIZECOLUMNS() function. If you'd have asked last week, I might not have been the guy to answer. 😁

 

Glad your project is moving forward.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

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.

Top Solution Authors