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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

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