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
Anonymous
Not applicable

Dax Calculation that Sum's Unique Values For that day by the Name

Hi,

 

I have a Calculated Column that needs to be summed up by each day. I only want the specific unique values to be counted so that it doesnt double/triple count. So for this data on 10/4/2021 I'd want only sum of 4.68 +2.1 = 6.78. There might be 3 unique values on that day too. I just want unique values to be summed from this column.

 

So I can have a calculation and throw it in a table. Can someone help me with this?

 

 

Thanks!

 

Hours Sum.png

 

1 ACCEPTED SOLUTION
PhilipTreacy
Super User
Super User

Hi @Anonymous 

 

Download sample PBIX file

 

Create a measure and use this code

 

SumValues = SUMX(VALUES('Table1'[Xim_Clock Hours]),[Xim_Clock Hours])

 

 

sumx.png

 

Change the table refewrence from 'Table1'  to whatever  the name of your table is.

 

Regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

3 REPLIES 3
PhilipTreacy
Super User
Super User

hi @Anonymous 

 

I can't see what you are doing without seeing your data - can you supply your PBIX file?

 

You say 'but it is not summing up correctly' - how so?   

 

'The difference seems to be lower by 1 day' - I can't tell what you mean from your screenshot.  What's not summing up properly?

 

Regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


PhilipTreacy
Super User
Super User

Hi @Anonymous 

 

Download sample PBIX file

 

Create a measure and use this code

 

SumValues = SUMX(VALUES('Table1'[Xim_Clock Hours]),[Xim_Clock Hours])

 

 

sumx.png

 

Change the table refewrence from 'Table1'  to whatever  the name of your table is.

 

Regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Anonymous
Not applicable

Hi,@ PhilipTreacy

 

Thanks for getting back to me. This is pulling in the correct data,  but it is not summing up correctly?

 

Not sure, why unless I am missing something. The difference seems to be lower by 1 day consistently when I slice it differently...

 

Thanks again!Clock Data.png

 

 

 

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.