Forum Discussion
Countifs in powerbi?
- Anonymous8 years ago
This is what I was looking for:
=
CALCULATE (
COUNTROWS ( DataDump1 ),
FILTER (
DataDump1,
DataDump1[languagePair] = EARLIER ( DataDump1[LanguagePair] )
),
FILTER (
DataDump1,
DataDump1[Subject Matter] = EARLIER ( DataDump1[Subject Matter] )
)
)
Anonymous
Try adding subject matter in above formula
Formula =
CALCULATE (
COUNTROWS ( DataDump1 ),
ALLEXCEPT (
DataDump1,
DataDump1[language pair],
DataDump1[vendor name],
DataDump1[subject matter]
)
)Anonymous
I was curious about this issue, tried Zubair_Muhammad solution but didn't get it to work for me. My DAX knowledge is limited to testing and reading posts on this forum and I'm sure there may be a better solution but this would work: I created a calculated column that combines all 3 column values into 1:
Combined = Sheet1[Purchase Order Vendor] & Sheet1[Language Pair] & Sheet1[Subject Matter]
...then created a simple measure:
UniqueCount = DISTINCTCOUNT(Sheet1[Combined])
Again, I'm sure there may be a completely single DAX formula that can do this but this worked for me.