Forum Discussion
Calculations using DAX
- 4 years ago
Matas
Please tryExtracted = VAR T1 = VALUES ( TableName[DOCID] ) VAR T2 = ADDCOLUMNS ( T1, "@NumOfBlanks", SUMX ( CALCULATETABLE ( TableName ), IF ( TableName[Value] = BLANK (), 1 ) ) ) VAR T3 = FILTER ( T2, [@NumOfBlanks] = BLANK () ) RETURN COUNTROWS ( T3 )Blanks = VAR T1 = VALUES ( TableName[DOCID] ) VAR T2 = ADDCOLUMNS ( T1, "@NumOfBlanks", SUMX ( CALCULATETABLE ( TableName ), IF ( TableName[Value] = BLANK (), 1 ) ) ) VAR T3 = FILTER ( T2, [@NumOfBlanks] <> BLANK () ) RETURN COUNTROWS ( T3 )
Hi tamerj1
Thank you for reply. My end goal is to show the Extracted and Blank values based on number of Distinct ID's categorized into separate fields.
Extracted means that my Column "VALUE" has any value, as long it is not null or Blank.
Blank, well it literally means Blank inside of "VALUE" column.
The solution should be that somehow I should calculate the Extracted and Blanks based on Distinct ID. Since my total number of distinct ID's is 715 documents, this graph maximum point should be 715. But depending on the Extracted and Blanks, it can be let's say 658 Extracted and 57 Blanks or so.
Hopefully I have not confused you even more.
Regards,
Matas
Matas
I think we're saying the same thing but in different languages. What are you slicing by in you chart?
- Matas4 years agoAdvocate II
Just to clarify, I think my issue is that calculations are being made by taking whole data from the table and not Distinct values, since if I am applying just Count on my Document ID's, this is the result, since I have multiple rows with same ID, since other columns contains different values:
The calculations should be made according to the Distinct ID's, which is: