cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
chloe914
Frequent Visitor

Month-to-date

Hello all, I don't know why MTD cannot be calculated correctly using below formula, while the one using quick measure is work.

Is there is anything wrong on the formula?

Here is the file:

https://drive.google.com/file/d/1880pWiT-tyujOM9Gl9l1ioD68OM7E870/view?usp=share_link

Thank you!

 

MTD Sales = CALCULATE(SUM(Orders[Sales]),DATESMTD(Orders[Order Date]))

 

Screenshot 2023-03-21 095437.png

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Great thanks!! 🙌

I followed your file and applied the changes to the other file and it works!

May I know why to add these?

- Add Calendar table, add relationship

- Add a new measure which is sum(orginal sales field)

hi,

The presence of a Calendar table allows one to use the Date/Time Intelligence functions.  One should always write explicit measures rather than dragging bare numeric fields to visuals.  This allows one to use those measures as inputs when writing other measures.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

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

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors