Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi PBI experts
I am unable to write DAX for below scenario.
In given Data table, measure to find out sum of qty where at least one of Com typ is C for each ID
| Company | Com typ | PID | id | Qty. |
| A | others | 1 | 281552 | 85 |
| C | C | 1 | 281552 | 160 |
| A | others | 1 | 281552 | 80 |
| C | C | 2 | 382990 | 60 |
| A | Others | 2 | 382991 | 40 |
| B | Others | 3 | 382991 | 45 |
| B | Others | 3 | 223812 | 138 |
| C | C | 3 | 223812 | 32 |
Result- 555
Thanks
@amitchandak Sorry to tag you like that but saw your replies on various queries so thought you might be the right person. Any ideas about this one?
Thanks
Radhika
Thanks for reply but this DAX will filter C and sum of only those qty
I need sum of all the rows (Qty) for IDs which have com typ as C. In above data except ID 382991 all others have C so, result as 555.
Hi @Anonymous,
You can use the following DAX function -
Sum Of Quantity = CALCULATE( SUM ('Table'[Qty]), FILTER ('Table', 'Table'[Com typ]) = 'C' )
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks
Radhika
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 6 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 14 | |
| 8 | |
| 8 | |
| 8 |