Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello Team,
My data has SKUs and their quantities. For example:
Region | Sku | Qty |
R1 | SKU1 | 300 |
R2 | SKU1 | 300 |
R3 | SKU1 | 300 |
R1 | SKU2 | 500 |
R2 | SKU2 | 500 |
R3 | SKU2 | 500 |
R4 | SKU2 | 500 |
R5 | SKU2 | 500 |
Let's say I'm showing this data in a line chart and not taking into account the regions I have.
I want to show the sum of the sale of quantities other than SKUs and not sum all of these. For example: I would like to show the total use of SKUs is (300+500 to 800).
But right now if I'm summarizing the column, I'm getting full sum like 500*5+300*3 (which is obvious).
Is there any way through which I can achieve the total amounts to be 800 apart from the other number.
Also, making an average will not work as SKUs are not repeated equally number of times. There could be 2 or more SKUs with the same amount, so you want to make sure that both quantities are added
Thank you in advance
@Greg_Deckler @amitchandak @ImkeF
Solved! Go to Solution.
Please try as a
sumx(summarize(table,table[SKU],"_max",max(table[QTY])),[_max])
Thanks a lot everybody for helping.
However, I tried the method shared by @amitchandak and it worked for me
Again, thanks y'all for providing your solutions.
Best Regards,
Rohan
Hi @Anonymous ,
You can create one measure as below:
Sum of distinct values = SUMX(SUMMARIZE(DISTINCT('table'[SKU]),'table'[SKU],"Quantity",DISTINCT('table'[Qty])),[Quantity])
Best Regards
Rena
Hi,
Write these measures
Quantity = MIN('Table'[Qty])
Measure = SUMX(VALUES('Table'[SKU]),[Quantity])
Hope this helps.
Please try as a
sumx(summarize(table,table[SKU],"_max",max(table[QTY])),[_max])
Thanks a lot
User | Count |
---|---|
93 | |
85 | |
78 | |
68 | |
62 |
User | Count |
---|---|
113 | |
99 | |
96 | |
64 | |
58 |