Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
P_P2595
Helper I
Helper I

how do I get the previous QTR value without date table

Input:

DescriptionMetricTargetQTRValue

1. Strenth Of Services

CS0QTR1234

1. Strenth Of Services

CS0QTR2123
1. Strenth Of ServicesCS0QTR3345
1. Strenth Of ServicesCS0QTR4111

2. Enhance

Communities0QTR1234

2. Enhance

Communities0QTR2123
2. EnhanceCommunities0QTR3345
2. EnhanceCommunities0QTR4111

 

Expected Output:

DescriptionMetricTargetQTR2 valuePrevious QTR Value

1. Strenth Of Services

CS0123234

2. Enhance

Communities0123234

Please note that I have only QTR data and I want to display previous QTR data based on slicer selection. I don't have a date on the table.

2 ACCEPTED SOLUTIONS
Ahmedx
Super User
Super User

8 REPLIES 8
Ashish_Mathur
Super User
Super User

Hi,

My preference would be to create a Date table.  If you wish to take this approach, then please share/clarify the following:

  1. Create a year column as well; and
  2. Clarify whether Q1 if JFM

Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Ahmedx
Super User
Super User

pls try this

Sample PBIX file attached

https://1drv.ms/u/s!AiUZ0Ws7G26RiDlB_QOME_CZvph8?e=ndZcTy
Screen Capture #1171.pngScreen Capture #1170.png

Hi Ahmedx,

Hope you are doing well.

Your solution is perfectly working for me but if the current QTR is blank then it's not displaying the previous QTR values but the previous QTR value is there.

Thanks

Thanks Ahmedx, that works for me😊.

hi? try this variant

Previous QTR Value = 
VAR _t1 =MAX('Table'[QTR])
VAR _t2 = MAX('Table'[Description])
VAR _LastValue = CALCULATE(LASTNONBLANKVALUE('Table'[QTR],[Sales]),'Table'[QTR]<_t1)
RETURN
_LastValue
-------------------
Previous QTR Value fixed = SUMX(VALUES('Table'[Description]),[Previous QTR Value]) 

Thank you, will try this

Thanks Ahmedx, Your solution worked for me😊.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.