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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
dkalinai
Helper I
Helper I

Calculate a per day sum and put it in a column per date

I am trying to figure out how to do something but cant quite grasp it, can someone help me?

So here is a table that I have:

dkalinai_0-1650822193753.png

We have dates that will grow progressively, we have some breakdown in the second column, i just made this up in fact I have upto 10 rows per date, then we have the sales for that day, the Sales Fro Selected Period is a Measure: 

 

Sales For Selected Period = CALCULATE(SUM(Table[Sales For Date]), ALLSELECTED(Sales For Date))

 

what that basically does it calculates sales across all rows in the Sales for Date column.
 
Now What I need is a new column that instead of the 56361 will show results per date so ultimately looking for somethign similar to this:
dkalinai_1-1650822478382.png

 

Basically where the Sales For Selected Period column is i want the date 4/20/2022 to show 26671 on as many rows as there are for 4/20/2022, then for rows where we have 4/19/2022 i want then umber to show 20502 for as many rows as that date is present, etc. 

Basically for me to figure out a rate of sales (just thought this up dont mind it) I need to have it on a per date basis to show in a single visual later, so i need the rates to be relative to the Date even if shown inside single table where 100% will be individual for Sales for Date per each day.

 

This is a manually made table with result i want in pre-last column and how it would be used in the last column instead of what i have in first screenshot:

dkalinai_0-1650823606704.png

 

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @dkalinai 

Assuming that the date column in from the same table then you may try

Sales For Selected Date = CALCULATE(SUM(Table[Sales For Date]), ALLEXCEPT (Table, Table[Date]))

View solution in original post

4 REPLIES 4
tamerj1
Super User
Super User

Hi @dkalinai 

Assuming that the date column in from the same table then you may try

Sales For Selected Date = CALCULATE(SUM(Table[Sales For Date]), ALLEXCEPT (Table, Table[Date]))

Anonymous
Not applicable

Hi,
I have a similar problem, but my date column is in different table for which I have already created relationship between the two tables but its not working, please help.

Hi @Anonymous 

Instead of ALLEXCEPT you can remove the filter of every column placed in the table visual other than the Date column using either ALL or REMOVEFILTERS

You are Brilliant! I spent the day figuring this out, i was sceptical to try the ALLEXCEPT thinking it did something else but your solution is xactly what I need! Thank you! Sending you lots of Karma points!

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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