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

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

Reply
Luzadriana255
Helper II
Helper II

Calculating the total amount of sales without counting repeated order values

Hello,
I am trying to build a matrix of the total sales of different products as a function of time. In my excel list there are orders that appear more than once and I want to count the price of those orders only once. For example for toys in June I want to add only once 200 because it comes from the same order "Order 1".

 

My data look like the one in the following table:

 

Product codeOrder     Date     Sales
Toys     1     06.06.2022     200
Toys     1                  06.06.2022      200
Toys     2      12.06.2022      135
Clothes     3      09.06.2022      160
Clothes     4      23.06.2022      135
Clothes     4      23.06.2022      135
Toys     5      03.07.2022      50
Toys     5      03.07.2022      50
Toys     7      22.07.2022      20
Toys     8      03.07.2022      60
Clothes     6      09.07.2022      200
Clothes     9      12.07.2022      200
Clothes    10      12.07.2022      25

 

I want to develop a Dashboard  matrix like the following:

 

Product/timeJuneJuly
Toys335130
Clothes295425


However I am not sure what formula to use for this. Thank you for your help.

2 ACCEPTED SOLUTIONS
Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

 

Jihwan_Kim_1-1673451616455.png

 

Jihwan_Kim_2-1673451736540.png

 

 

Expected result measure: =
SUMX (
    SUMMARIZE (
        Data,
        'Product'[Product code],
        'Calendar'[Date],
        Data[Order],
        Data[Sales]
    ),
    Data[Sales]
)

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

jewel_at
Resolver I
Resolver I

Hi @Luzadriana255 

 

You can also consider using the Remove Duplicates in Power Query, if you're not using that info in other visuals. 

 

  • Select the Order, Date and Sales columns 
  • Go to Home > Remove Row > Remove Duplicates

 

Jewel

 

View solution in original post

6 REPLIES 6
FreemanZ
Super User
Super User

hi @Luzadriana255 

 

you may also try to plot a table visual with two measures like this:

JUN = 
VAR _table = DISTINCT(TableName)
RETURN
SUMX(
    FILTER(_table, MONTH(TableName[Date]) =6),
    TableName[Sales] 
)

JUL = 
VAR _table = DISTINCT(TableName)
RETURN
SUMX(
    FILTER(_table, MONTH(TableName[Date]) =7),
    TableName[Sales] 
)

 

it worked like this:

FreemanZ_0-1673454331511.png

Sounds good, however I have many different months and years, so it may take so much time to include every month. Thank you!

jewel_at
Resolver I
Resolver I

Hi @Luzadriana255 

 

You can also consider using the Remove Duplicates in Power Query, if you're not using that info in other visuals. 

 

  • Select the Order, Date and Sales columns 
  • Go to Home > Remove Row > Remove Duplicates

 

Jewel

 

Thank you so much!

Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

 

Jihwan_Kim_1-1673451616455.png

 

Jihwan_Kim_2-1673451736540.png

 

 

Expected result measure: =
SUMX (
    SUMMARIZE (
        Data,
        'Product'[Product code],
        'Calendar'[Date],
        Data[Order],
        Data[Sales]
    ),
    Data[Sales]
)

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Thank you so much!

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.