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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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