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

Created a measure using Previous month and its not working

I have a table with Saleamount and saledate, I also have a date table with dates

 

 

I have added relationshipbetween date table and sales table and using this query

 

 

previousMonth = CALCULATED(SUM(Sales[Saleamount]), PreviousMonth(Date[Date])))

 

 

but this query is not populating anything!!! 

 

Sales table is also related to customer table and customer table is related to another dates table called dates1 

 

I was not able to link sales table to dates1 as I had a relation with customer already...

 

 

can anyone tell what the problem is?

1 ACCEPTED SOLUTION
v-yulgu-msft
Employee
Employee

Hi @Anonymous,

 

Do you mean when you added the measure [previousMonth] to visual, it shew no results? Please make sure you added [Date] column into visual from calendar table 'Date' rather than 'Sales'.

 

Regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yulgu-msft
Employee
Employee

Hi @Anonymous,

 

Do you mean when you added the measure [previousMonth] to visual, it shew no results? Please make sure you added [Date] column into visual from calendar table 'Date' rather than 'Sales'.

 

Regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Its working now, I missed that.

 

Thank You!

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.