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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
ChoiJunghoon
Helper III
Helper III

[DAX] Create Table with using group sum

Hello 
I want to Create DAX Table 

 

Table1

ModuleIDStatusScore
A10
A10
A11
A20
A20
A20
A31
A310
A31
A40
A41
A40
A50
A50
A50

 

TableT2 (Remove) 

ModuleID
A1

I want to this table

ModuleIDSUMStatusScore
A312
A41

 

Create Table=
VAR x0=SUMMARIZE(Table1,Table1[ModuleID],"SUM_",SUM(Table1[StatusScore]))
VAR x1=FILTER(x0,[SUM_]>0)
VAR x2=CALCULATETABLE(x1,FILTER(Table2,Table2[ModuleID]<> ?? )
RETURN

x2 

How Can i write the DAX code ? 
Please help me!! 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@ChoiJunghoon , Try like

Create Table=
VAR x0=SUMMARIZE(filter(Table1, not(Table1[ModuleID] in values(Table2[ModuleID])) ,Table1[ModuleID],"SUM_",SUM(Table1[StatusScore]))
VAR x1=FILTER(x0,[SUM_]>0)
RETURN
x1

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
Jihwan_Kim
Super User
Super User

Picture1.png

 

New Table =
VAR removed_table =
FILTER ( Table1, NOT ( Table1[ModuleID] IN VALUES ( Table2[ModuleID] ) ) )
VAR remove_zero =
FILTER ( removed_table, CALCULATE ( SUM ( Table1[StatusScore] ) ) <> 0 )
VAR groupby_sum =
GROUPBY (
remove_zero,
Table1[ModuleID],
"@SUMStatusScore", SUMX ( CURRENTGROUP (), Table1[StatusScore] )
)
RETURN
groupby_sum


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
amitchandak
Super User
Super User

@ChoiJunghoon , Try like

Create Table=
VAR x0=SUMMARIZE(filter(Table1, not(Table1[ModuleID] in values(Table2[ModuleID])) ,Table1[ModuleID],"SUM_",SUM(Table1[StatusScore]))
VAR x1=FILTER(x0,[SUM_]>0)
RETURN
x1

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thank you!! Thank you!!

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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