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
JulietZhu
Helper IV
Helper IV

Sum payment based on each day

I need sum payment for each day. For example 20170905 has two payments and I need total for that day of (3567.16+176.68)= 3743.84. Need help for Dax? Tryied so many  and still can't figure it out. Thanks

Capture2.PNG

1 ACCEPTED SOLUTION

Hi @JulietZhu

 

You need to create a calculated table rather than a calculated measure. Click on the [new table] button on the modelling tab and then paste in your code.

 

 Let me know how you go 🙂


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

View solution in original post

4 REPLIES 4
Phil_Seamark
Employee
Employee

Hi @JulietZhu

 

If you drag the Date field to a Table visual, then drag the Payment_Amt, it should automatically sum the Payment_Amt

 

If you are trying to create a table that summarizes this data, you could try the following calculated table

 

Table = SUMMARIZECOLUMNS(
                    'Table1'[date],
                    "Sum of Amount",SUM('Table1'[Payment_Amt])
                    )

To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

hi @Phil_Seamark

 

Yes. PowerBI will automatically sum based on day if changing to table visual.

 

I do need create this table for other calculated columns. I tried your formula, but got the following error message. Can't figure out why? Thanks

Capture3.PNG

 

Hi @JulietZhu

 

You need to create a calculated table rather than a calculated measure. Click on the [new table] button on the modelling tab and then paste in your code.

 

 Let me know how you go 🙂


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

@Phil_Seamark,

 

Thanks for your suggestion. It works. Awesome.

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.