Forum Discussion
Exclude multiple values from calculated column
- 4 years ago
Hi hejszyszky ,
Since I do not have your specific data, I have created a template data based on what you have provided so far:
Then use the below dax to create a new column:
final = VAR index11 = RANKX ( FILTER ( 'Summarized Raport', 'Summarized Raport'[Data] = EARLIER ( 'Summarized Raport'[Data] ) ), 'Summarized Raport'[Zmiana(A,B,C,D)], , ASC ) RETURN IF ( index11 = 1, SUMX ( FILTER ( 'Summarized Raport', 'Summarized Raport'[Data] = EARLIER ( 'Summarized Raport'[Data] ) ), 'Summarized Raport'[value] ), 0 )Final output:
You can adapt my code to your specific environment and needs.
Did I answer your question? Mark my post as a solution!
Best RegardsLucien
Hi, hejszyszky
I believe I get your point, here's the picture and code:
DuplicityCheck =
var currentDate = 'Table'[Date]
var currentName = 'Table'[Name]
var currentIndex = 'Table'[Index]
var duplicityvalues = filter('Table', currentDate = 'Table'[Date] && currentName = 'Table'[Name])
var duplicity = COUNTROWS(duplicityvalues)
var LowestDuplicity = MINX(duplicityvalues, 'Table'[Index])
var _removeDuplicate = SWITCH(TRUE(),
LowestDuplicity = currentIndex && duplicity >=2 , "330",
duplicity = 1, "Your expression",
"0")
return _removeDuplicatePlease note that "your expression" represents an expression that you would normally use if everything is correct.
Hi, vojtechsima
Thanks for your fast reply!
I am facing some issues, i believe its with Index column. In your scenario,Index column, is it just a row number?
- vojtechsima4 years agoSuper User
Hi, hejszyszky
It's just a simple Index column generated by Power Query:However, it really helps with your issue.
- hejszyszky4 years agoHelper II
Well thats unlucky, cuz my table is an dax expression 😐