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.
Hi Experts! I have a data model below. I need help to create a calculation for YOY and MOM %. But in this calculation I want to calculate with date. For Example If I want to calculate YOY now 10/09/2022 This (Quarter-last year same quarter and date should be 10/09/2022)/last year same quarter and date should be 10/09/2022. Out put I want If the user select 2022Q3 YOY% should be calculate (This quarter actuals at this date-last year same quarter same date actuals)/last year same quarter same date actuals. (100-120)/120 =-16.66
I am trying with this measure but I want to calculate with date.
YOY % =
VAR thisYear =
CALCULATE('Common Measures'[Actuals])
VAR lastYear =
CALCULATE ('Common Measures'[Actuals], SAMEPERIODLASTYEAR ('DIM Date'[DATE_KY]) )
RETURN
DIVIDE ( thisYear - lastYear, lastYear, 0 )
Data model:-
Date Table with date key column | |||
Year | Quarter | Month | Day |
2022 | Q4 | October | 1 |
2022 | Q4 | October | 2 |
2022 | Q4 | October | 3 |
2022 | Q4 | October | 4 |
2022 | Q4 | October | 5 |
2022 | Q4 | October | 6 |
2022 | Q4 | October | 7 |
2022 | Q4 | October | 8 |
2022 | Q4 | October | 9 |
Actuals | ||
Year | Quarter | Actuals |
2021 | Q1 | 242 |
2021 | Q2 | 443 |
2021 | Q3 | 449 |
2021 | Q4 | 538 |
2022 | Q1 | 566 |
2022 | Q2 | 890 |
2022 | Q3 | 559 |
2022 | Q4 | 244 |
Hi, @Sivakumartn1
Could you please tell me whether your problem has been solved?
Best Regards,
Community Support Team _ Eason
@Sivakumartn1 , here Actual should be measure and datekey should be a date
CALCULATE ('Common Measures'[Actuals], SAMEPERIODLASTYEAR ('DIM Date'[DATE_KY]) )
Date table should be marked as date table, and join should be single directional
Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :https://youtu.be/OBf0rjpp5Hw
https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5b...
User | Count |
---|---|
84 | |
78 | |
70 | |
47 | |
42 |
User | Count |
---|---|
106 | |
50 | |
49 | |
40 | |
40 |