Forum Discussion
Grouping by Column Contains?
- 6 years ago
chq , Please find the link to pbix. Minor chnage in column formula
https://www.dropbox.com/s/ghbeh6z55erxdtd/GroupTeam.pbix?dl=0
chq , create a new column like
New column =
var _1 = countX(filter(table,[Transaction #]=earlier([Transaction #]) && [Type]="Type"),[Transaction #])
return
if(isblank(_1) || _1 =0,[Type],"Long Term")
I have Taken count of long , you have one more countx and create logic
or use in
[Type]="Long"
[Type]="Basketball"
or
[Type] in{"Long","Basketball"}
- chq6 years agoHelper II
amitchandak I am not sure I understand can you give me an example formula with that logic also applied? Thanks
- amitchandak6 years agoSuper User
chq , Please find the link to pbix. Minor chnage in column formula
https://www.dropbox.com/s/ghbeh6z55erxdtd/GroupTeam.pbix?dl=0
- chq6 years agoHelper II
amitchandak great this looks like it works correctly. Where I am confused is how would I add additional levels to this though?
I can't have the non-designated values reflect as "Type", they will need to follow a logic where if the new value is not Long then it becomes a different variable
For Example:
Calc = var _1 = COUNTX(FILTER(Sheet1,[Transaction #] =EARLIER([Transaction #]) && CONTAINSSTRING([Type],"Baseball")),[Transaction #])
Return if(ISBLANK(_1),[Type],"Baseball")
Would I be able to have it designate those as Baseball and if the new Calc is not Baseball and [Type] contains Long then Cacl = Long?