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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Joseph_Hchaime
Helper III
Helper III

Need help with Dax coding

I'm having trouble finding the right syntax to calculate the SUM of the Net Collection column for unique values of the Item Code. Can someone help? I will be using the CALCULATE () function to invoke a userelationship between a date dimension table and a date that's not showing in the sample data below. 

 

 

PBI DAX Issue.png

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Hi @Joseph_Hchaime ,

 

Please crate a new measure like:

Measure = 
SUMX (
    SUMMARIZE (
        'Table',
        'Table'[BillID],
        'Table'[AllocationDate],
        'Table'[NetCollection]
    ),
    'Table'[NetCollection]
)

vcgaomsft_1-1692260159807.png

vcgaomsft_0-1692260129567.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

View solution in original post

Anonymous
Not applicable

Hi @Joseph_Hchaime ,

Could you please provide an simple file and a screenshot of the expected output? This is gonna help.

How to provide sample data in the Power BI Forum - Microsoft Fabric Community

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

View solution in original post

5 REPLIES 5
Joseph_Hchaime
Helper III
Helper III

Screenshot 2023-08-16 170442.png

 This is a more accurate depiction of what I need to achieve. I need to calculate the distinct sum of NetCollection and Net Collection USD for every MatterID/BillID/AllocationDate 

Anonymous
Not applicable

Hi @Joseph_Hchaime ,

 

Please crate a new measure like:

Measure = 
SUMX (
    SUMMARIZE (
        'Table',
        'Table'[BillID],
        'Table'[AllocationDate],
        'Table'[NetCollection]
    ),
    'Table'[NetCollection]
)

vcgaomsft_1-1692260159807.png

vcgaomsft_0-1692260129567.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

Can I use this number in a detailed table as well with the other columns next to it? or it will mess up the calculation?

Anonymous
Not applicable

Hi @Joseph_Hchaime ,

Could you please provide an simple file and a screenshot of the expected output? This is gonna help.

How to provide sample data in the Power BI Forum - Microsoft Fabric Community

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

amitchandak
Super User
Super User

@Joseph_Hchaime , Try a new measure like

 

Sumx(summarize(Table, Table[Item Code], Table[New Collection]), [New collection])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.