Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have created a SamePeriodLastYear calculation, then charted it to show my data by Quarter for the past three years.
Here is the calculation - which seems to work
SamePeriodLastYear Policyholders = CALCULATE([Count of PolicyHolders],SAMEPERIODLASTYEAR('DIM Dates'[Date]))
and here is the formula for [Count of PolicyHolders]
Count of PolicyHolders = DISTINCTCOUNT(All_Policies[ClientNumber])
I have a date table in the data model and I thought this was working fine until I checked the numbers.
The problem is, that when I chart this information, it seems that the numbers don't always match.
For example:
2016 Q1 Count of PolicyHolders is 1436 but
2017 Q1 SamePeriodLastYear Policyholders is 1484
Shouldn't these be the same number?
Similar discrepencies exist with many of my other quarterly values.
Is this simply because there are a different number of business days in Q2 last year vs this year and so the SamePeriodLastYear is spread over more or workdays? Or what could be causing the difference?
Thanks for any insight you can provide.
Hi @kmclorg,
Have you tried the solutions provided above? Does it work in your scenario? If it works, could you accept it as solution to close this thread?
If you still have any question on this issue, feel free to post here.
Regards
Just a few of basic checks:
Cheers,
Owen
Hi @kmclorg,
I have created a SamePeriodLastYear calculation, then charted it to show my data by Quarter for the past three years.
Could you try using PREVIOUSQUARTER function to see if it works in your scenario?
SamePeriodLastYear Policyholders = CALCULATE ( [Count of PolicyHolders], PREVIOUSQUARTER ( 'DIM Dates'[Date] ) )
Regards
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
100 | |
80 | |
63 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |