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:
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.
Below is the DAX Measure I created - But this does not work:
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
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: