Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello,
I am trying to determine how to use the parallelperiod function (or dateadd, or anything else that will work) to perform a calculation for a selected date interval, e.g. for a quarter, and the same calculation for the prior date interval.
I have a date dimension table with values in a QUARTER column like this:
01/01/2019
04/01/2019
07/01/2019
10/01/2019
01/01/2020
04/01/2020
07/01/2020
10/01/2020
I have a slicer with these quarters (and calendar years) which I intend the user to use to select the date interval they want to look at.
I have a measure with this:
Solved! Go to Solution.
When you are using the time intelligent functions you should always be referencing the DATE column of your date table.
tester =
CALCULATE (
DISTINCTCOUNT ( MYTBL[TR_ID] ),
PARALLELPERIOD ( DIM_DATE[DATE], -1, QUARTER )
)
Some notes on the requirements of the date table from https://dax.guide/parallelperiod/
In order to use any time intelligence calculation, you need a well-formed date table. The Date table must satisfy the following requirements:
The way time intelligent functions work is like this
1/1/2021 |
1/2/2021 |
... |
3/30/2021 |
3/31/2021 |
When you are using the time intelligent functions you should always be referencing the DATE column of your date table.
tester =
CALCULATE (
DISTINCTCOUNT ( MYTBL[TR_ID] ),
PARALLELPERIOD ( DIM_DATE[DATE], -1, QUARTER )
)
Some notes on the requirements of the date table from https://dax.guide/parallelperiod/
In order to use any time intelligence calculation, you need a well-formed date table. The Date table must satisfy the following requirements:
The way time intelligent functions work is like this
1/1/2021 |
1/2/2021 |
... |
3/30/2021 |
3/31/2021 |
Thank you for the very thorough explanation - this helps me a lot, and it is now working the way I want.
The two things I was doing wrong were 1) I did not know that I needed to mark the table as a date table, and 2) I should have been selecting my date column for the parallel period date because it is unique, rather than my QUARTER column which is not unique.
Best regards,
Carolyn
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
76 | |
76 | |
55 | |
37 | |
34 |
User | Count |
---|---|
99 | |
56 | |
53 | |
44 | |
40 |