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.
Hi,
I need help adding a column. I have the below columns and need to add a new column that will show the Previous Quarter Value.
I do not have date or month columns in the dataset.
Fiscal Year | Fiscal Quarter | Current Quarter value | Previous Quarter Value (New column) |
2020 | 1 | 200 | 0 |
2020 | 2 | 180 | 200 |
2020 | 3 | 136 | 180 |
2020 | 4 | 120 | 136 |
2021 | 1 | 490 | 120 |
2021 | 2 | 230 | 490 |
Thanks in advance
Daven
Solved! Go to Solution.
is this what you want?
Column =
VAR previous=maxx(FILTER('Table (3)','Table (3)'[Fiscalyear]=EARLIER('Table (3)'[Fiscalyear])&&'Table (3)'[fiscalquarter]=EARLIER('Table (3)'[fiscalquarter])-1),'Table (3)'[currentquartervalue])
VAR previous2=maxx(FILTER('Table (3)','Table (3)'[Fiscalyear]=EARLIER('Table (3)'[Fiscalyear])-1&&'Table (3)'[fiscalquarter]=4),'Table (3)'[currentquartervalue])
return if('Table (3)'[fiscalquarter]=1,previous2,previous)+0
Proud to be a Super User!
Hi, @Daven
Please try the below.
Previous Q Value CC =
VAR currentyear = 'Table'[Fiscal Year]
VAR currentquarter = 'Table'[Fiscal Quarter]
RETURN
IF (
currentquarter <> 1,
CALCULATE (
SUM ( 'Table'[Current Quarter value] ),
FILTER (
'Table',
'Table'[Fiscal Year] = currentyear
&& 'Table'[Fiscal Quarter] = currentquarter - 1
)
),
CALCULATE (
SUM ( 'Table'[Current Quarter value] ),
FILTER (
'Table',
'Table'[Fiscal Year] = currentyear - 1
&& 'Table'[Fiscal Quarter] = 4
)
)
)
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi @Daven,
Did these suggestions help with your scenario? if that is the case, you can consider Kudo or accept the helpful suggestions to help others who faced similar requirements to find it more quickly.
If these also not help, please share more detailed information to help us clarify your scenario to test.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
Hi, @Daven
Please try the below.
Previous Q Value CC =
VAR currentyear = 'Table'[Fiscal Year]
VAR currentquarter = 'Table'[Fiscal Quarter]
RETURN
IF (
currentquarter <> 1,
CALCULATE (
SUM ( 'Table'[Current Quarter value] ),
FILTER (
'Table',
'Table'[Fiscal Year] = currentyear
&& 'Table'[Fiscal Quarter] = currentquarter - 1
)
),
CALCULATE (
SUM ( 'Table'[Current Quarter value] ),
FILTER (
'Table',
'Table'[Fiscal Year] = currentyear - 1
&& 'Table'[Fiscal Quarter] = 4
)
)
)
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
is this what you want?
Column =
VAR previous=maxx(FILTER('Table (3)','Table (3)'[Fiscalyear]=EARLIER('Table (3)'[Fiscalyear])&&'Table (3)'[fiscalquarter]=EARLIER('Table (3)'[fiscalquarter])-1),'Table (3)'[currentquartervalue])
VAR previous2=maxx(FILTER('Table (3)','Table (3)'[Fiscalyear]=EARLIER('Table (3)'[Fiscalyear])-1&&'Table (3)'[fiscalquarter]=4),'Table (3)'[currentquartervalue])
return if('Table (3)'[fiscalquarter]=1,previous2,previous)+0
Proud to be a Super User!
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 |
---|---|
113 | |
97 | |
79 | |
73 | |
56 |
User | Count |
---|---|
145 | |
105 | |
104 | |
90 | |
63 |