Forum Discussion
Prasad23
2 years agoFrequent Visitor
Merge the values into one
Hi Team, I'm facing the below issue, I need required result but i'm getting Age(my result). Could you please help me to get this. Regards, Prasad.
- 2 years ago
Hi Prasad23 ,
You can try below calculated column expression.
Result 1 = VAR TempTable = CALCULATETABLE( ADDCOLUMNS('Table',"diff",DATEDIFF('Table'[created date],'Table'[closed date],DAY)), ALLEXCEPT('Table','Table'[BU],'Table'[Sub_bu]) ) VAR MinDiff = MINX(TempTable,[diff]) VAR MaxDiff = MAXX(TempTable,[diff]) RETURN IF(MinDiff<>MaxDiff,MinDiff&" - "&MaxDiff&" days",MinDiff&" days")Or is another result what you want?
Result 2 = VAR TempTable = CALCULATETABLE( ADDCOLUMNS('Table',"diff",DATEDIFF('Table'[created date],'Table'[closed date],DAY)), ALLEXCEPT('Table','Table'[BU],'Table'[Sub_bu]) ) VAR MinDiff = MINX(TempTable,[diff]) VAR MaxDiff = MAXX(TempTable,[diff]) VAR Result = IF(MinDiff<>MaxDiff,MinDiff&" - "&MaxDiff&" days",MinDiff&" days") RETURN IF( ROWNUMBER( ALL('Table'[BU],'Table'[Sub_bu],'Table'[created date],'Table'[closed date]), ORDERBY('Table'[created date],ASC,'Table'[closed date],ASC), PARTITIONBY('Table'[BU],'Table'[Sub_bu]) )=1, Result )Demo - Merge the values into one.pbix
Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !
Thank you~
Anonymous
2 years agoNot applicable
Hi Prasad23 ,
Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.
If these also don't help, please share more detailed information and description to help us clarify your scenario to test.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng