Forum Discussion
Unique and not unique count
- 4 years ago
You can't add two "total" rows, but you can concatenate two result together like this. This will give the two results on all rows, but you can use IF(HASONEVALUE() or ISFILTERED() to show two results only in the "total".
Unique/Not Unique =
var u = <unique expression>
var n = <not unique expression>
return u & "/" & n
Pat
Hi Roym
It seems you have a Total issue, so please see this post from Greg_Deckler :
Fo your report, If you want to have a Not Unique Count, you can try something like this:
Total_Findings_DISTINCTCOUNT =
IF (
HASONEVALUE ( Table1[Reporting Entity] ),
CALCULATE (
DISTINCTCOUNT ( Table1[Issue name] ),
FILTER ( Table1, Table1[Source] = "Finding" )
),
COUNTROWS ( FILTER ( Table1, Table1[Source] = "Finding" ) )
)
Total_Issues_DISTINCTCOUNT =
IF (
HASONEVALUE ( Table1[Reporting Entity] ),
CALCULATE (
DISTINCTCOUNT ( Table1[Issue name] ),
FILTER ( Table1, Table1[Source] = "Issue" )
),
COUNTROWS ( FILTER ( Table1, Table1[Source] = "Issue" ) )
)
output for the not unique count:
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
VahidDM Thanks, this one works perfecly to calculate the non-unique totals! One last question, is it also possible to add an additional row that shows the unique numbers? So that you have two two rows for the totals?
- mahoneypat4 years ago
Microsoft Employee
You can't add two "total" rows, but you can concatenate two result together like this. This will give the two results on all rows, but you can use IF(HASONEVALUE() or ISFILTERED() to show two results only in the "total".
Unique/Not Unique =
var u = <unique expression>
var n = <not unique expression>
return u & "/" & n
Pat
- Roym4 years ago
Helper IV
Great, thanks!!