PREVIOUSQUARTER Measure PBI Desktop

MarkCBB

Active Member
Joined
Apr 12, 2010
Messages
497
Hi there,

I am still new to DAX. I am trying to create a measure that calculates the sales value of the Previous Quarter.

I am able to create one for the current Quarter - Works perfectly:
Code:
TQ Value = TOTALQTD([Total Value];MAIN_SALES[DATE])

Now I am trying to create one for the previous Quarter but I am not winning:

Below is what I found on MS Site - However this is not working as there is no context (The below measure returns "(Blank)") - I am using this as a value in a Card on PBI Desktop.
Code:
LQ Value = CALCULATE([Total Value];PREVIOUSQUARTER(MAIN_SALES[DATE]))

Below is the DAX Measure I created - But this does not work:
Code:
LQ Value = TOTALQTD([Total Value];PREVIOUSQUARTER(MAIN_SALES[DATE]))

I am sure I am not far off, what I am doing wrong?

Edit

This seems to be closer to what I want - However it is only taking month 1 and 2 within the previous quarter and month the 3rd Month
Code:
LQ Value = CALCULATE([Total Value];DATESQTD(DATEADD(MAIN_SALES[DATE];-1;QUARTER)))
 
Last edited:

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Think I got it, seems to be working:
Code:
LQ Value = TOTALQTD([Total Value];PARALLELPERIOD(MAIN_SALES[DATE];-1;QUARTER))

Any comments or additional advice wold be most welcome.
 
Upvote 0

Forum statistics

Threads
1,215,467
Messages
6,124,984
Members
449,201
Latest member
Lunzwe73

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top