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
GracieLeeMonroe
4 years agoFrequent Visitor
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