Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
In my data model I have two tables, one is named "Sales" and the other is my "Dates" table. The Dates table is flagged as a date type table. In my Sales table I have a SoldOn date and the data type is date. I join the SoldOn date to the Date in the date table in my model. Now I want to calculate the previous quarter data and be able to move across years. I already have a measure in the model named GrossSales, this is what I want to see previous quarter totals on.
First I try this:
PVQTR:=CALCULATE([GrossSales], PARALLELPERIOD('Sales'[SoldOn], -1, quarter))
And this works using the date from the Sales table, but in my report I want to use the Date table to filter this data. So in my date table I have a value for Year Quarter. I want to use that in a slicer so the user can select the starting quarter. Even though those tables have a relationship, the measure above does not display the correct previous quarter when slicing on a value from the Date table. If I change the measure to use the date value from the Date table it doesn't work at all.
PVQTR:=CALCULATE([GrossSales], PARALLELPERIOD('Dates'[Date], -1, quarter))
I feel like I am missing something simple here. Any feedback is appreciated.
Solved! Go to Solution.
This one
PVQTR:=CALCULATE([GrossSales], PARALLELPERIOD('Dates'[Date], -1, quarter))
or
PVQTR:=CALCULATE([GrossSales], dateadd('Dates'[Date], -1, quarter))
should work.
Make sure
1. Dates is marked as date table
2. You are using qtr, month, year, any date related columns from date table only
Why Time Intelligence Fails - Power bi 5 Savior Steps for TI: https://youtu.be/OBf0rjpp5Hw
This one
PVQTR:=CALCULATE([GrossSales], PARALLELPERIOD('Dates'[Date], -1, quarter))
or
PVQTR:=CALCULATE([GrossSales], dateadd('Dates'[Date], -1, quarter))
should work.
Make sure
1. Dates is marked as date table
2. You are using qtr, month, year, any date related columns from date table only
Why Time Intelligence Fails - Power bi 5 Savior Steps for TI: https://youtu.be/OBf0rjpp5Hw
Yep, knew I was overlooking something simple. Had the wrong slicer setup when I was testing between the two different measures. Thanks for your help, much appreciated.
User | Count |
---|---|
13 | |
10 | |
8 | |
7 | |
5 |
User | Count |
---|---|
24 | |
16 | |
15 | |
10 | |
7 |