Forum Discussion
irenelitw629
6 years agoHelper II
Build Calculated column in PowerBI query
Hi,
I am relatively new to powerBI.
I built a calculated column in the table as per below:
Territory = CALCULATE (
FIRSTNONBLANK ( vwAttainmentFileExport[Coverage Territory], 1 ),
FILTER ( ALL( vwAttainmentFileExport ), Enablement[Name] = vwAttainmentFileExport[Name]&& vwAttainmentFileExport[Quota Element]="Primary")
)
What is the equivelant formula for PowerBI query column?
I need to add column in the query in order to use "split the column" functions but I am having difficulty to write the query.
Thanks for your advice
You may use code below to add a custom column.
let r = _ in Table.SelectRows(vwAttainmentFileExport, each ([Name] = r[Name]) and ([Quota Element] = "Primary")){0}[Coverage Territory]
2 Replies
- v-chuncz-msftCommunity Support
You may use code below to add a custom column.
let r = _ in Table.SelectRows(vwAttainmentFileExport, each ([Name] = r[Name]) and ([Quota Element] = "Primary")){0}[Coverage Territory] - az38Community Champion
Hi irenelitw629
if I understand you correct - try ADDCOLUMNS function https://docs.microsoft.com/en-us/dax/addcolumns-function-dax
youcould also show us the desired finish result to possibility give you a correct and full advice
do not hesitate to give a kudo to useful posts and mark solutions as solution