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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

MTD calculation on a Divide measure

Hi All,

 

I'm trying to calculate the MTD in my case for CPA however the values are not adding through the dates. 
CPA is calculated as = Divide([Money Spent], [No of customers])

My calculation for CPA MTD is = TOTALMTD([CPA],DateTable[Date])
Capture-2.PNG

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , That will give ration will not add the daily ratio.

 

Try a measure like

CPA MTD is = calculate(sumx(values(DateTable[Date]), [CPA]),datesmtd(DateTable[Date]))

 

Make sure DateTable is marked as date table

 

Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :https://youtu.be/OBf0rjpp5Hw
https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5bd4

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

View solution in original post

3 REPLIES 3
Tanushree_Kapse
Impactful Individual
Impactful Individual

Hi @Anonymous 

 

Try this: 
CPA MTD  = TOTALMTD([CPA],DATESMTD(DateTable[Date]))

Mark this as a solution, if I answered your question. Kudos are always appreciated.

Thanks

amitchandak
Super User
Super User

@Anonymous , That will give ration will not add the daily ratio.

 

Try a measure like

CPA MTD is = calculate(sumx(values(DateTable[Date]), [CPA]),datesmtd(DateTable[Date]))

 

Make sure DateTable is marked as date table

 

Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :https://youtu.be/OBf0rjpp5Hw
https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5bd4

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

Thanks, that worked perfectly 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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