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!View all the Fabric Data Days sessions on demand. View schedule
Hello,
i have a table named "V_QTSDAMA" and I have a column named "ItemName" with a repeating products with its own stock.
I need to calculate the sum of " BESOIN PF " for each product. ( to not to have the products repeating themselves)
PS : note that the column "BESOIN PF" it's calculated as a Mesure.
- i work on a directquery Mode.
For exemple this is result that I want , i made it on excel :
Thanks,
ACHRAF KASMI
Solved! Go to Solution.
Hi @achrafkasmi ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
(2) We can create two measures.
BESOIN PF = MIN('Table (2)'[OnHand])-MIN('Table (2)'[qtsdemandé])Measure 2 = SUMX('Table (2)','Table (2)'[BESOIN PF])
(3) Then the result is as follows.
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @achrafkasmi ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
(2) We can create two measures.
BESOIN PF = MIN('Table (2)'[OnHand])-MIN('Table (2)'[qtsdemandé])Measure 2 = SUMX('Table (2)','Table (2)'[BESOIN PF])
(3) Then the result is as follows.
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
any help please ?
I’ll explain, the [BESOIN PF] is need is the current stock less the need for current orders and this is the formula :
BESOIN PF =
MIN('V_QTSDAMA'[OnHand])-min('V_QTSDAMA'[qtsdemandé])Thanks,
ACHRAF KASMI
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 18 | |
| 11 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 31 | |
| 26 | |
| 21 | |
| 13 | |
| 12 |