cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SivaMani Senior Member
Senior Member

TOTALMTD, TOTALQTD isn't working

I'm facing an issue with TOTALMTD, TOTALQTY DAX functions. 

 

Here is my problem,

 

I have 2 tables,

one is Dimension table for Date and another one is fact. There is a relationship between them based on Date field.

 

I have created a measure - TOTALMTD(SUM(fact[Sales]),Dimension[Date]))

 

It isn't working as expected. But when use Fact[Date] instead Dimension[Date] or Remove the relationship, It's working fine.

 

It's absolutely strange. Kindly help me with this.

6 REPLIES 6
Highlighted
abhi9255 Regular Visitor
Regular Visitor

Re: TOTALMTD, TOTALQTD isn't working

Check weather the date field in the fact table and date field in the dimension table is of same data type.

Earlier I also faced the same issue then I found out that in my fact table date was stored in datetime format and in my calender table date was stored as the type of date format

SivaMani Senior Member
Senior Member

Re: TOTALMTD, TOTALQTD isn't working

Thanks for the quick response. Both are in the same data type(Date).

abhi9255 Regular Visitor
Regular Visitor

Re: TOTALMTD, TOTALQTD isn't working

can u share the relationship diagram?

SivaMani Senior Member
Senior Member

Re: TOTALMTD, TOTALQTD isn't working

Relationship.PNG

Reno_35 Frequent Visitor
Frequent Visitor

Re: TOTALMTD, TOTALQTD isn't working

hi all,

 

i'm having the same issue, did you find any solution on that one ? 

 

thank you !!!

 

Usates Member
Member

Re: TOTALMTD, TOTALQTD isn't working

Create two new tables. 

 

In the first table, pull in your date and sales total, both from your LiquorSales data.

 

Second table, pull in your date column from your Dates_modelview and sales total from your LiquorSales.

 

Narrow both down to just this month and compare results. If your "TotalMTD" is wrong, these two tables should not match.  This will help you find the issue.

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 132 members 1,582 guests
Please welcome our newest community members: