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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors