Forum Discussion
GracieLeeMonroe
4 years agoFrequent Visitor
Help needed with COUNTIF in DAX
All Problem: I need to allocate the discount to invoice line items, but there are cases when the discount is credited in separate credit memo and has only one invoice line as a result. Then I need...
- 4 years ago
All,
found it, here is the DAX Command I used:
IF(AND(Table1[Discount]="Discount", Calculate(COUNTROWS(Table1),ALLEXCEPT(Table1,Table1[serviceMonth],Table1[invoiceNumber]))>1),0, Table1[Sum of Total]+Table1[AllocatedDiscountPerInvoiceLine])
Have a great day!
Regards
GracieLee
v-cazheng-msft
Community Support
4 years ago
Noticed that you have resolved this issue by yourself. Could you please kindly mark your solution to help the other members find it more quickly? Thanks in advance!
Best Regards,
Community Support Team _Caiyun