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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
MaleneL
Resolver I
Resolver I

Sum of a report measure

Hi

I am working on creating a YTD measure on the basic of a report measure already created. So I just want it to find the sum of the report measure on the basic of wich month it is:

 

The report measure is:

 

TK (TM) =
VAR _Month = CALCULATE([TK],Timeintelligence[Name] = "Month")
VAR _LastMonth = CALCULATE([TK],Timeintelligence[Name] = "Last Month")
VAR _NewInMonth = CALCULATE([TK_Ny],Timeintelligence[Name] = "Month")

Return
IF(NOT ISBLANK(_Month) && NOT ISBLANK(_LastMonth), ((_LastMonth+_NewInMonth)-_Month))
 
result (exempel) will be:
Jan = 1111
Feb = 2222
March = 3333
etc.
 
so the next step is to (if Excel ;O) to sum the total of TK (TM) for each month
Jan = 1111
Feb = 3333
March = 6666
etc.
 

I have tryed difference approach but without luck 

(SUM, SUMMERIZE, CALCULATE)

Hope you guess can helt 

 

4 REPLIES 4
Anonymous
Not applicable

Hi  @MaleneL ,

 

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you

If convenient, the results can be displayed in the form of pictures.

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Hi 

sorry for the delay answar.

I have created sample pbix to show the problem but I do not know how to share it?

 

amitchandak
Super User
Super User

@MaleneL , For YTD you can use time intelligence with date table

example

YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"12/31"))
Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))

 

 

YTD= CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Year]=max('Date'[Year]) && 'Date'[Day of Year] <= Max('Date'[Day of Year]) ))
LYTD = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Year]=max('Date'[Year])-1 && 'Date'[Day of Year] <= Max('Date'[Day of Year])))


you can use month no in place of Day of Year, if needed

 

Power BI — Year on Year with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
https://www.youtube.com/watch?v=km41KfM_0uA

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thanks, but unfortannly it does not work for this problem... 

You are using a table for the YTD calculation, this is not possible in this case, I need to find a way to calculate YTD by using the report measure TK (TM)
 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors