cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper IV
Helper IV

Why PreviousQuarter for Contuso is not working?

I tried to create new Measure for calculating SalesAmount for Previousyear, but it is not producing any value. Why not?

 

PowerBI_Previous_Quarter_Contuso.png

2 REPLIES 2
Community Support
Community Support

Hi, @kenny_i 

There‘s no problem with you measure.

For the selected quarter, if there is no data for the previous quarter, it will appear ‘blank’.

For example, there is no data for the 2010 Quarter/4 ,so  it will appear ‘blank’ when  you  check the fourth quarter of 2011.

1.png

Here is a sample I made.

URL: https://wicren-my.sharepoint.com/:u:/g/personal/michael_wicren_onmicrosoft_com/EWYpCOUP_FBDrE9RbGEMf...

 

3.png

If I  misunderstood your question, please let me know.

 

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

Super User IV
Super User IV

You want last qtr or last year same qtr

 

Try these

MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
last MTD (complete) Sales =  CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH(dateadd('Date'[Date],-1,MONTH))))

QTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(('Date'[Date])))

Last QTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(dateadd('Date'[Date],-1,QUARTER)))

Last year same QTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(dateadd('Date'[Date],-1,Year)))

YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(('Date'[Date Filer])))

Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date Filer],-1,Year)))

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.

My Recent Blog - https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601

 

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Helpful resources

Announcements
secondImage

Happy New Year from Power BI

This is a must watch for a message from Power BI!

December Update

Check it Out!

Click here to read more about the December 2020 Updates!

Community Blog

Check it Out!

Click here to read the latest blog and learn more about contributing to the Power BI blog!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors