Forum Discussion
NickProp28
Post Partisan
5 years agoSUMMARIZE table
Dear Community, Good Day, Kindly help me on DAX that I would like to use summarize function which only return first row of each consolnumber into new table. Condition: IsDomestic col...
- 5 years ago
Hi NickProp28 ,
You can create calculate column to rank based on the conditions:
Rank = Rankx( FILTER( Route, Route[IsDomestic] = "N" && Route[ConsolNumber] = EARLIER(Route[ConsolNumber])), Route[LegOrder],,ASC,Dense)And then you can use this column to create table visual (filter: IsDomestic = N and Rank = 1) or you can create a New Table by using this code:
NewTable = CALCULATETABLE( Route, FILTER(Route, Route[IsDomestic] = "N" && Route[Rank] = 1) )New table will have only the required rows.
_______________
If I helped, please accept the solution and give kudos! 😀
lkalawski
Resident Rockstar
5 years agoHi NickProp28 ,
You can create calculate column to rank based on the conditions:
Rank = Rankx(
FILTER(
Route, Route[IsDomestic] = "N" &&
Route[ConsolNumber] = EARLIER(Route[ConsolNumber])),
Route[LegOrder],,ASC,Dense)And then you can use this column to create table visual (filter: IsDomestic = N and Rank = 1) or you can create a New Table by using this code:
NewTable =
CALCULATETABLE(
Route,
FILTER(Route,
Route[IsDomestic] = "N" && Route[Rank] = 1)
)New table will have only the required rows.
_______________
If I helped, please accept the solution and give kudos! 😀
- NickProp285 years ago
Post Partisan