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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
ElMaldy
New Member

Creating a new table with two calculated fields

Hi, I'm creating one new table, based on another table where I have activities and status (completed/not completed). I'm using this instruction to do that:
OpenTrainings = SUMMARIZECOLUMNS(TableTrainings[EmployeeID],TableTrainings[Chapter], FILTER(TableTrainings,TableTrainings[Completed]=FALSE()), "TotalOpen", COUNT(TableTrainings[ProcessID]))

 

It creates one table with the information of all the Open Processes BUT I want to add the closed processes, how can I do that?

EmployeeIDChapterTotalOpen
15Chapter 01 - xxx activity9
17Chapter 01 - xxx activity8
17Chapter 02 - xxx activity6

 

 

I would like to add the field: 

FILTER(TableTrainings,TableTrainings[Completed]=TRUE()), "TotalClosed", COUNT(TableTrainings[ProcessID])

 

but when I try to add to the same instruction, it fails.

 

Do I have to create another table even when the information is in the same table?

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @ElMaldy 

 

You don't have to create another table. You can create a new table with below DAX. 

New Table = SUMMARIZECOLUMNS('TableTrainings'[EmployeeID],'TableTrainings'[Chapter],"TotalOpen",COUNTX(FILTER('TableTrainings','TableTrainings'[Completed]=FALSE()),'TableTrainings'[ProcessID]),"TotalClosed",COUNTX(FILTER('TableTrainings','TableTrainings'[Completed]=TRUE()),'TableTrainings'[ProcessID]))

And here is another option:

New Table = SUMMARIZE('TableTrainings','TableTrainings'[EmployeeID],'TableTrainings'[Chapter],"TotalOpen",CALCULATE(COUNT('TableTrainings'[ProcessID]),'TableTrainings'[Completed]=FALSE()),"TotalClosed",CALCULATE(COUNT('TableTrainings'[ProcessID]),'TableTrainings'[Completed]=TRUE()))

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

1 REPLY 1
v-jingzhang
Community Support
Community Support

Hi @ElMaldy 

 

You don't have to create another table. You can create a new table with below DAX. 

New Table = SUMMARIZECOLUMNS('TableTrainings'[EmployeeID],'TableTrainings'[Chapter],"TotalOpen",COUNTX(FILTER('TableTrainings','TableTrainings'[Completed]=FALSE()),'TableTrainings'[ProcessID]),"TotalClosed",COUNTX(FILTER('TableTrainings','TableTrainings'[Completed]=TRUE()),'TableTrainings'[ProcessID]))

And here is another option:

New Table = SUMMARIZE('TableTrainings','TableTrainings'[EmployeeID],'TableTrainings'[Chapter],"TotalOpen",CALCULATE(COUNT('TableTrainings'[ProcessID]),'TableTrainings'[Completed]=FALSE()),"TotalClosed",CALCULATE(COUNT('TableTrainings'[ProcessID]),'TableTrainings'[Completed]=TRUE()))

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors
Top Kudoed Authors