Forum Discussion
Tito
2 years agoHelper IV
add new column in PowerQuery
Hello, I would like to add a new column in PowerQuery. If a customer has Group A, it should return "Group A", otherwise "non Group A". Best regards Tito Data: Rsult
- 2 years ago
Hi Tito ,
You could create it as a Calculated column in the front end=
Group A =var Namecur = [Name] --Current Namevar grouphigh = COUNTROWS(FILTER(List, Table[Group] = "A" && List[Name] = Namecur ))returnif(grouphigh > 0, "Group A", "non Group A")
Tito
2 years agoHelper IV
Hello SamWiseOwl
I have calculated it with a mesaure:
Dynamic Group =
VAR SelectedGroup = SELECTEDVALUE(GoupParameter[Group])
RETURN
IF(
ISBLANK(SelectedGroup),
BLANK(),
IF(
COUNTROWS(
FILTER(
Tabelle,
Tabelle[Group] = SelectedGroup &&
Tabelle[Name] = MAX(Tabelle[Name])
)
) > 0,
SelectedGroup,
"non " & SelectedGroup
)
)
SamWiseOwl
2 years agoSuper User
Well Done!
- Tito2 years agoHelper IV
- SamWiseOwl2 years agoSuper UserDynamic Group =var Namecur = SELECTEDVALUE('Group'[Please choose group])--Current NameVAR SelGroup = SELECTEDVALUE('Group'[Please choose group])var grouphigh =CALCULATE(COUNTROWS(List),all(List[Group]), List[Group] = SelGroup)returnif(grouphigh > 0, "Group " & Namecur, "non Group "& Namecur)
- Tito2 years agoHelper IV
Hello SamWiseOwl
perfect , it worked. Thank you very much.