Make 2 measures to calculate in two steps the sum (of a number of months) of distinctcounted IDNRs
A. Fist make a measure based on a discountcount formula.
Measure1: =DISTINCTCOUNT([IDNR])
B. Create a secound measure to calculate the total IDNR per month and a correct Endtotal based on Measure1
Measure2:SUMX(VALUES(TableName[month]);[Measure1])
Measure1 does not give the total of all months together, if gives the total unique IDNR in a year (1.163)
Measure2 gives the year total of the unique quantity of IDNR per month (6.266)
Tip: if you want a total per [location] or [year], simply change Measure2 VALUES into TableName[location] or [year]