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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.