Forum Discussion
Count is incorrect. What could have been causing this?
What should I be looking for?
MH7 is a measure that counts the last 7 days, it should be counting 7, but its just showing 4.
MH7 =
CALCULATE(
DISTINCTCOUNT('Utility Allowance Tracker - HDR'[Created]),
FILTER('Utility Allowance Tracker - HDR',
'Utility Allowance Tracker - HDR'[Created] >= TODAY()-7),
'Utility Allowance Tracker - HDR'[Client Name] = "Mercy Housing")
Hi New_Folder , if possible, share a sample data without sensible content in order to give us an way to replicate your issue.
In time, maybe you should check- Whether you intend to count rows or distinct dates.
- The actual content and granularity of the Created field.
- Hidden filters affecting the visual.
- Inconsistencies in Client Name.
- Whether the record has Created values that are blank, null or truncated.
6 Replies
- Alex_Sawdo
Resolver II
When using DISTINCTCOUNT, it literally counts the "distinct" values from the column you're counting, and not the "total" number of values in the column. Try using COUNT() instead of DISTINCTCOUNT() instead.
Also, if possible can you share a subset of data from the 'Utility Allowance Tracker - HDR'[Created] column to assist in answering your question? - Zanqueta
Super User
Hi New_Folder , if possible, share a sample data without sensible content in order to give us an way to replicate your issue.
In time, maybe you should check- Whether you intend to count rows or distinct dates.
- The actual content and granularity of the Created field.
- Hidden filters affecting the visual.
- Inconsistencies in Client Name.
- Whether the record has Created values that are blank, null or truncated.
- ryan_mayu
Super User
maybe you can create a new measure
measure=sumx(values(Site Name), MH7)
if this does not work, pls provide some sample data and expected output
- v-dineshya
Community Support
Hi New_Folder ,
Thank you for reaching out to the Microsoft Community Forum.
You want number of requests, but you are counting distinct Created timestamps/dates. If multiple requests were created on the same day, they collapse into one count.
Please try below measures.
1. If you want requests in last 7 days, try below measure.
MH7 =
CALCULATE(
COUNTROWS('Utility Allowance Tracker - HDR'),
'Utility Allowance Tracker - HDR'[Created] >= TODAY() - 7,
'Utility Allowance Tracker - HDR'[Client Name] = "Mercy Housing"
)
2. If you want a rolling 7-day window including time, try below measure.MH7 =
CALCULATE(
COUNTROWS('Utility Allowance Tracker - HDR'),
'Utility Allowance Tracker - HDR'[Created] >= NOW() - 7,
'Utility Allowance Tracker - HDR'[Client Name] = "Mercy Housing"
)I hope this information helps. Please do let us know if you have any further queries.
Regards,
Dinesh
- v-dineshya
Community Support
Hi New_Folder ,
We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. And, if you have any further query do let us know.
Regards,
Dinesh
- v-dineshya
Community Support
Hi @New_Folder ,
We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. And, if you have any further query do let us know.
Regards,
Dinesh