Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
irenelitw629
Helper II
Helper 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
 
 
1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@irenelitw629 

 

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]

 

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@irenelitw629 

 

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]

 

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
az38
Community Champion
Community 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


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.