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
robsmith1980
Frequent Visitor

SUM of value by customer and month

Hi

 

I hope someone can help!

 

I am trying to create a calculated column or measure that will track the cumulative total of customers subscription values by month

 

IE Total of Customer As $ IN January, Total of Customers Bs $ In January, Total of Cusotomer As $ in February, etc

 

AND

 

Total for January, Total for February, etc

 

Any help greatly appreciated 🙂

 

i currently have the data in a table similar to the below.

 

CustomerSubsctiption IDConsumption DateValue in $
Customer A101/01/201945
Customer A201/01/201920
Customer A301/01/201915
Customer A401/01/201975
Customer B501/01/201978
Customer B601/01/201915
Customer B701/01/201915
Customer C801/01/2019463
Customer C901/01/201945
Customer A101/02/2019499
Customer A201/02/201942
Customer A301/02/201912
Customer A401/02/20192
Customer B501/02/201985
Customer B601/02/20190
Customer B701/02/201983
Customer C801/02/2019846
Customer C901/02/201996
4 REPLIES 4
harshnathani
Community Champion
Community Champion

Hi @robsmith1980 ,

 

123.JPG

 

Incase this is what you are looking for, you will need to create a Calendar Table using CalendarAuto() and link it with you consumption date.

 

Drag Month and Year from the Calendar and Customer and Value in $ from the Subscriber Table.

 

Regards,

Harsh Nathani

 

Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!!

In case it did not help, please provide additional information and mark me with @ so that I can investigate further

Hi @robsmith1980 ,

 

Did the solution work for you.

 

Please mark as solution for other community members to benefit.

 

Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

ash123
Regular Visitor

Hi Rob,

 

I tried to solve your query not sure if that exactly matches your requirement. 

 

I added a calculated Column Commsales. See the table below

 

Capture.JPG

 

Dax to achieve this: 

 

Commsales =
VAR Sales =
SUM ( 'Table'[Value in $] )
VAR customer = 'Table'[Customer]
VAR C_date = 'Table'[Consumption Date]
VAR Subscription = 'Table'[Subsctiption ID]
RETURN
CALCULATE (
SUM ( 'Table'[Value in $] ),
FILTER (
'Table',
'Table'[Customer] = customer
&& 'Table'[Consumption Date] = C_date
&& 'Table'[Subsctiption ID] <= Subscription))
 
Visuals:
 
Capture.JPG
 
Regards,
Kaushlendra Mishra 
Greg_Deckler
Super User
Super User

What is the expected output from your sample data?

 

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.

Top Solution Authors