简体   繁体   中英

How do I sum only unique values ​in a column of repeating values ​in power bi?

I made a summary table to simplify my question. I have two columns named "Month" and "Price". Prices are the same by month. I want to sum the unique values in the "Price" column. So I want to reach 30 + 50 + 80 + 60 = 220. How should I write a measurement for this?

1个

Thank you!

I used nested SUM() and DISTINCT() formulas but no results.

There are many options, for example:

=
SUMX(
    VALUES( 'Table'[Month] ),
    CALCULATE(
        MIN( 'Table'[Price] )
    )
)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM