Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi,
I am new to power BI, i have a query which i tried a lot, my data as like below
Year | Quarter | Total Sale |
2014 | Q1 | 563 |
2014 | Q2 | 512 |
2014 | Q3 | 16541 |
2014 | Q4 | 53 |
2015 | Q1 | 265 |
2015 | Q2 | 236546 |
2015 | Q3 | 965 |
2015 | Q4 | 365 |
2016 | Q1 | 786 |
2016 | Q2 | 265 |
2016 | Q3 | 36654 |
2016 | Q4 | 148641 |
2017 | Q1 | 5164 |
2017 | Q2 | 165 |
2017 | Q3 | 165
|
I wan to show to differene for 1. 2016 Q4 to 2015 Q4 difference similary 2015 Q5 to 2014 Q4
2. 2017 Q3 to 2016 Q3 (present year latest Quarter to Previous Year Last Quarter)
in a single calculation.
Please help me on this. thanks in advance.
--Habib.
Solved! Go to Solution.
Please see the pbix file attached here as well
With your sample data
Hi @shaikhabib
Try this MEASURE
Difference = VAR SamePeriod_LY = CALCULATE ( SUM ( TableName[Total Sale] ), FILTER ( ALL ( TableName[Year] ), TableName[Year] = SELECTEDVALUE ( TableName[Year] ) - 1 ) ) RETURN IF ( NOT ( ISBLANK ( SamePeriod_LY ) ), SUM ( TableName[Total Sale] ) - SamePeriod_LY )
Please see the pbix file attached here as well
With your sample data