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

SUM SALES WITH PROMO

I have a problem in calculating sales made with receipts with at least one product being promoted.

 

my sales table is

 

TVE_IDTVE_IdArticoloTVE_PriceTVE_CodicePromozioneTVE_IDScontrino
18389683,954441
28549782,03    1
385087510    1
485357627,99    2
585357627,99    2
681020327,99    2
785357627,99    3
881020327,994444
984975710    4
108383662,99    4
118383662,99    4
128383662,99    5
138551442,49    5
148226733,59    5
1583517519    5
1683663423,92    5
1783426138,5    6
188343086,474447
198549632,03    8
208549662,03    8
218549672,03    8
228549602,73    8
2384783727,9    9
2483433014,974449
2581582319,95    9

 

where is it

TVE_ID indicates sales line ID

TVE_price indicates the selling price

TVE_codicepromo indicates the code of the promotion

TVE_IDScontrino indicates the receipt number.

 

How can I calculate the sum of all receipts that contain at least one product in promotion 444?

 

I expect this result to come: promotional sales = 129.24

because it sum the following sales line

 

TVE_IDTVE_IdArticoloTVE_PriceTVE_CodicePromozioneTVE_IDScontrino
18389683,954441
28549782,03    1
385087510    1
881020327,994444
984975710    4
108383662,99    4
118383662,99    4
188343086,474447
2384783727,9    9
2483433014,974449
2581582319,95    9

 

44 REPLIES 44

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.