cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TrevorBoat
Helper I
Helper I

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 @TrevorBoat 

 

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 @TrevorBoat 

 

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 @TrevorBoat 

 

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!


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
August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power BI Dev Camp Session 24 without aka link and time 768x460.jpg

Ted's Dev Camp - July 28, 2022

Watch Session 24 of Ted's Dev Camp along with past sessions!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors