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

Month To Date Totals

I am successfully calcualting month today sales in this table 

 

In this image the guy that says 40,000 doesn't have any sales for September, but Power BI is showing his August Sales of 40,191 still.

 

It totals it correctly but it showing incorrectly, is their a hack that I can do it defaults to 0 if data is missing?

 

I am using TotalMTD function in Power bi to do this calucation

2016-09-07 17_04_56-Sales Performance - Power BI Desktop.png

7 REPLIES 7
CahabaData
Memorable Member
Memorable Member

ummmm not to be snarky - but you state that it totals correctly;  not to my eye - I can easily see the total should be above $4000.....

 

am only pointing out because the math relationships appear to be out of context for more than just that single row....

 

 

www.CahabaData.com
Anonymous
Not applicable

No worries, 

 

The number in the total is the true number, the $40,000 should be zero and that number is rolling over from August MTD Sales.  The trick I am trying to get is that when a person doesn't have a row for the month how to get that number to be zero.

BhaveshPatel
Community Champion
Community Champion

Try validating your measure with the following formula and see if the same issue persists.

[MTD Sales]:=CALCULATE([sales amount],DATESMTD(Calender[Date]))

Thanks & Regards,
Bhavesh
Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.
Anonymous
Not applicable

Same reslt using the DatesMTD

GilesWalker
Skilled Sharer
Skilled Sharer

@AnonymousAre you able to show your relationships table as this can help. Also what is the data like; is there a DateKey table? Also what is the mesaure you are using and what is in the table you created in terms of values, filters, measures etc?

 

Thanks,

 

Giles

Anonymous
Not applicable

No relationships on this one, it is all in the same table for the values, it is essentially a big big spreadsheet that has a row for each invoice with the amount and also the salesman and the date it shipped.  I using those three fields to run these calculations.  

 

I have read about a Date Table but never understood how to implement one or where it would tecnically come in handy.  I have consistently always had a problem with my charts in a new month until someone creates a data point.  Would a side date table referenced to my Ship Date column correct this?

@Anonymous


I have read about a Date Table but never understood how to implement one or where it would tecnically come in handy.  I have consistently always had a problem with my charts in a new month until someone creates a data point.  Would a side date table referenced to my Ship Date column correct this?


As most of the time intelligence functions require a standard Date table to work correctly, I would suggest you to create a Date table in this scenario. You should be able to use CALENDAR function to create the Date table, and use your Date column to relate your table and this Date table.

 

Regards

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.