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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.