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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Data Manipulation/Calculated Column Creation Help

Hello, I am perplexed by a problem on how to manipulate my data.  Essentially, I need to create a new column that determines if a customer account is active or inactive based on whether they have any active contracts or not. My raw data is presented like this:

Origin.jpg


I need to make the above table look like this:

Output.jpg

Once I am able to display the above, I can manipulate it to provide the appropriate counts, etc.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous

 

Create 3 measures for this.

Status = IF([Active Contracts]>0, "Active","Inactive")

Active Contracts =  CALCULATE(COUNT('Status Column'[Contract Number]), FILTER('Status Column','Status Column'[Status]="Active"))

InActive Contracts = CALCULATE(COUNT('Status Column'[Contract Number]), FILTER('Status Column','Status Column'[Status]="Inactive"))

Status.PNG 

 

Hope this is clear.

 

Thanks
Raj

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi

  Can you please post the data in text format so that it can be copied?

 

Thanks
Raj

Anonymous
Not applicable

 

Here you go:

Customer NumberContract NumberContract Status
1231000TRUE
1232000TRUE
4563000FALSE
4564000TRUE
4565000

TRUE

7896000

FALSE

7897000

FALSE

7898000

FALSE

 

Anonymous
Not applicable

Hi @Anonymous

 

Create 3 measures for this.

Status = IF([Active Contracts]>0, "Active","Inactive")

Active Contracts =  CALCULATE(COUNT('Status Column'[Contract Number]), FILTER('Status Column','Status Column'[Status]="Active"))

InActive Contracts = CALCULATE(COUNT('Status Column'[Contract Number]), FILTER('Status Column','Status Column'[Status]="Inactive"))

Status.PNG 

 

Hope this is clear.

 

Thanks
Raj

Anonymous
Not applicable

should the 'Status Column' in your measures be the table name? ex: Active Contracts = CALCULATE(COUNT('Sheet1'[Contract Number]), FILTER('Sheet1','Sheet1'[Status]="Active")) 

 

When I use the table/column name conventions, I'm prompted with this dialogue box:

dialogue.jpg
Anonymous
Not applicable

nevermind, i converted the original column into a text type from True/False on the modeling tab.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors