Forum Discussion
Anonymous
3 years agoNot applicable
DAX help
Hi all, I have metadatas_ column which is like in below format {"v":[{"v":{"f":[{"v":"40187"},{"v":"life"},{"v":[{"v":{"f":[{"v":"en"},{"v":"Learn"}]}}]},{"v":[]}]}},{"v":{"f":[{"v":"57236"},...
- 3 years ago
Anonymous
maybe you can try this
Column = VAR _c=if(SEARCH("China",'Table'[metadatas],1,0)>0,1,0) VAR _ee=if(SEARCH("Enlarged Europe",'Table'[metadatas],1,0)>0,1,0) VAR iap=if(SEARCH("India and Asia Pacific",'Table'[metadatas],1,0)>0,1,0) VAR mea=if(SEARCH("Middle East & Africa",'Table'[metadatas],1,0)>0,1,0) VAR na=if(SEARCH("North America",'Table'[metadatas],1,0)>0,1,0) VAR sa=if(SEARCH("South America",'Table'[metadatas],1,0)>0,1,0) var g=if(SEARCH("Globe",'Table'[metadatas],1,0)>0,1,0) return if(g=1,"Globe",if(_c+_ee+iap+mea+na+sa>1,"Locality",if(_c+_ee+iap+mea+na+sa=1,"Region")))
ryan_mayu
3 years agoSuper User
Anonymous
maybe you can try this
Column =
VAR _c=if(SEARCH("China",'Table'[metadatas],1,0)>0,1,0)
VAR _ee=if(SEARCH("Enlarged Europe",'Table'[metadatas],1,0)>0,1,0)
VAR iap=if(SEARCH("India and Asia Pacific",'Table'[metadatas],1,0)>0,1,0)
VAR mea=if(SEARCH("Middle East & Africa",'Table'[metadatas],1,0)>0,1,0)
VAR na=if(SEARCH("North America",'Table'[metadatas],1,0)>0,1,0)
VAR sa=if(SEARCH("South America",'Table'[metadatas],1,0)>0,1,0)
var g=if(SEARCH("Globe",'Table'[metadatas],1,0)>0,1,0)
return if(g=1,"Globe",if(_c+_ee+iap+mea+na+sa>1,"Locality",if(_c+_ee+iap+mea+na+sa=1,"Region")))
- Anonymous3 years agoNot applicable
Hi Ryan,
Thanks a lot
It helped...- ryan_mayu3 years agoSuper User
you are welcome
- Anonymous3 years agoNot applicable
Hi,
one more help....can you please help me to get it in power query as a custom column....it will be helpful
Thanks
sai