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
briankwlo
Frequent Visitor

Making a new table from another table with calculation

Hello,

 

Sample Data:

courseiduseridfullnamecompletion_statedivision
11Reading coursefinishedAAA
12Reading courseNot finishAAA
13Reading courseNot finishBBB
14Reading courseNot finishCCC
15Reading courseNot finishDDD
21PracticalNot finishAAA
22PracticalNot finishAAA
23PracticalfinishedBBB
24PracticalNot finishCCC
25PracticalNot finishDDD

 

 

 

 

with filter courseid = 1:

divisiontotalfinishedpercentage
AAA2150%
BBB100%
CCC100%
DDD100%

 

with filter courseid = 2:

divisiontotalfinishedpercentage
AAA200%
BBB11100%
CCC100%
DDD100%

 

 

Would anyone help about this situation and suggest me how to create a new table for this?

 

Thanks!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @briankwlo 

 

You can create the below measures

 

Finished = CALCULATE(COUNT(Course[division]),Course[completion_state] = "finished")+0
 
percentage = DIVIDE([Finished],[Total],0)
 
Total = CALCULATE(COUNT(Course[division]),ALLEXCEPT(Course,Course[courseid],Course[division]))
 
This is the output of the measures in the table visual
esha_shah2002_0-1653888456295.pngesha_shah2002_1-1653888466349.png

If this post helps, Accept it as a solution

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @briankwlo 

 

You can create the below measures

 

Finished = CALCULATE(COUNT(Course[division]),Course[completion_state] = "finished")+0
 
percentage = DIVIDE([Finished],[Total],0)
 
Total = CALCULATE(COUNT(Course[division]),ALLEXCEPT(Course,Course[courseid],Course[division]))
 
This is the output of the measures in the table visual
esha_shah2002_0-1653888456295.pngesha_shah2002_1-1653888466349.png

If this post helps, Accept it as a solution

It's work! 

Thank you esha_shah2002! 

Have a nice day!

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.