Forum Discussion
annie_liu
Helper I
2 years agoHow to show duplication that column is a duplication in a matrix table with state text
I need help with a formula that can tell me that a particular date compare to another date ..that the STATE of the project are duplicated. When I put it into PowerBI it shows like soo..using the...
- Anonymous2 years ago
You may try this measure
Result = var firstState = MAXX(TOPN(1, 'Table', 'Table'[Version Date], ASC), 'Table'[RPlan State]) var lastState = MAXX(TOPN(1, 'Table', 'Table'[Version Date], DESC), 'Table'[RPlan State]) return IF(ISFILTERED('Table'[Version Date]), MAX('Table'[RPlan State]), IF(COUNTROWS('Table')<2, "Not Duplication", IF(firstState=lastState, "Duplication", "Not Duplication")))Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!
Anonymous
2 years agoNot applicable
Hi annie_liu
Assume that there is only one state on each date and there are only two dates in the matrix, you can try the following measure:
Result =
var firstState = MAXX(TOPN(1, 'Table', 'Table'[Version Date], ASC), 'Table'[RPlan State])
var lastState = MAXX(TOPN(1, 'Table', 'Table'[Version Date], DESC), 'Table'[RPlan State])
return
IF(ISFILTERED('Table'[Version Date]),
MAX('Table'[RPlan State]),
IF(firstState=lastState, "Duplication", "Not Duplication"))
Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!
annie_liu
Helper I
2 years agoThis is great! but what happens if one of the two dates don't have a State ..what would be the formula for that?
- Anonymous2 years agoNot applicable
You may try this measure
Result = var firstState = MAXX(TOPN(1, 'Table', 'Table'[Version Date], ASC), 'Table'[RPlan State]) var lastState = MAXX(TOPN(1, 'Table', 'Table'[Version Date], DESC), 'Table'[RPlan State]) return IF(ISFILTERED('Table'[Version Date]), MAX('Table'[RPlan State]), IF(COUNTROWS('Table')<2, "Not Duplication", IF(firstState=lastState, "Duplication", "Not Duplication")))Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!