Forum Discussion
earlier function combine with other columns
Hi,
I have a table as below.
Column uses
however, in case of method a and b is for same country and salesman need to be written as mixed.
as an example updated method column should be as below.
below you may find the related pbix file
selpaqm , refer this can work as a new column
Column =
VAR _count= CALCULATE(DistinctCount([Method]) ,FILTER('Table','Table'[salesman/country]=EARLIER('Table'[salesman/country])))+0
return if(_count>1,"Mixed", [method])
5 Replies
- Greg_Deckler
Community Champion
selpaqm First, DAX Formatter is your friend: https://www.daxformatter.com/
Column = VAR __Table = SUMMARIZE( FILTER ( 'Table', 'Table'[salesman/country] = EARLIER ( 'Table'[salesman/country] ), [method] ) RETURN IF ( COUNTROWS(__Table>1, "mixed", MAXX(__Table,[method]) )If not, share data as text in a table please.
- selpaqm
Helper V
- amitchandak
Super User
selpaqm , refer this can work as a new column
Column =
VAR _count= CALCULATE(DistinctCount([Method]) ,FILTER('Table','Table'[salesman/country]=EARLIER('Table'[salesman/country])))+0
return if(_count>1,"Mixed", [method])