Forum Discussion
Anonymous
6 years agoNot applicable
how to Count distinct date value by Name ?
hello, How to calculate distinct date value by Name? want dax for it. I want this column in power bi ( countdistinct of date by Name). Plus then sum all the values of name single time. ...
- 6 years ago
Anonymous
as you use a date slicer you could try this
Measure = var _minDate = CALCULATE(MIN('Table'[Date]),ALLSELECTED('Table')) var _maxDate = CALCULATE(MAX('Table'[Date]),ALLSELECTED('Table')) return SUMX(SUMMARIZE('Table', 'Table'[Name], "DistinctDates", CALCULATE(DISTINCTCOUNT('Table'[Date]), ALLEXCEPT('Table','Table'[Name]), DATESBETWEEN('Table'[Date], _minDate, _maxDate))),[DistinctDates] )to notificate me about new questions please mark me with @ symbol
az38
Community Champion
6 years agoAnonymous
sorry, for your second task try
Measure = SUMX(
SUMMARIZE('Table', 'Table'[Name], "DistinctDates", CALCULATE(DISTINCTCOUNT('Table'[Date]), ALLEXCEPT('Table','Table'[Name]))),
[DistinctDates]
)