Bilal
Bilal

Reputation: 17

DistinctCount On A specific condition In Power bi

I need to take the DistinctCount(InvNumber) of a InvNumber column by creating a new measures that is #NoofInvoice, I need to show that column In MY report, but Column #NoofInvoice I want to take on Condition that If(OrderType='SALES' and OrderType is a column which contain two values SALES and RETURN or then only I need distinctcount(InvNumber)) in Power bi

Upvotes: 0

Views: 3709

Answers (1)

user8065556
user8065556

Reputation:

How about if you create a new measure called "No. of Invoices" like this:

No. of Invoices = CALCULATE(DISTINCTCOUNT(InvNumber), FILTER(Table_Name, 'Table_Name'[OrderType] = "Sales"))

Let me know how you go with it! :)

Upvotes: 3

Related Questions