Forum Discussion
Anonymous
7 years agoNot applicable
Display unique items that appeared each year
I am new to DAX and using Power Query & Powerpivot in Excel 2016 to transform and load data to a pivot. I am simply trying to get a list of Unique Characteristics Values (CHAR VAL) and their counts (...
- 7 years ago
Anonymous
Try this revision
Distinct Count With Totals = IF ( HASONEFILTER ( tblData[Item Appearance Date (Year) 1] ) && HASONEFILTER ( tblData[CHAR DESCRIPTION] ) && HASONEFILTER ( [CHAR VALUE] ), [DistinctCount], SUMX ( SUMMARIZE ( tblData, [Item Appearance Date (Year) 1], [CHAR DESCRIPTION], [CHAR VALUE] ), [DistinctCount] ) )
Anonymous
7 years agoNot applicable
Zubair_Muhammad getting Errors on both formulae:
DISTINCTCOUNT: Semantic error: The function COUNT takes an argument that evaluates to numbers or dates and cannot work with Values of type strings. DISTINCT COUNT WITH TOTALS: Semantic error: Dependency error in the measure.
What could be wrong here? is it the format of the dates?
Zubair_Muhammad
Community Champion
7 years agoAnonymous
Did you see the attached file in previous post
Both Formulas are working in my PC.
I am using your sample file
- Zubair_Muhammad7 years ago
Community Champion
Anonymous
Try this revision
Distinct Count With Totals = IF ( HASONEFILTER ( tblData[Item Appearance Date (Year) 1] ) && HASONEFILTER ( tblData[CHAR DESCRIPTION] ) && HASONEFILTER ( [CHAR VALUE] ), [DistinctCount], SUMX ( SUMMARIZE ( tblData, [Item Appearance Date (Year) 1], [CHAR DESCRIPTION], [CHAR VALUE] ), [DistinctCount] ) )