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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount 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
User | Count |
---|---|
15 | |
11 | |
6 | |
6 | |
5 |
User | Count |
---|---|
29 | |
17 | |
11 | |
7 | |
5 |