Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe 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.
Input:
Description | Metric | Target | QTR | Value |
1. Strenth Of Services | CS | 0 | QTR1 | 234 |
1. Strenth Of Services | CS | 0 | QTR2 | 123 |
1. Strenth Of Services | CS | 0 | QTR3 | 345 |
1. Strenth Of Services | CS | 0 | QTR4 | 111 |
2. Enhance | Communities | 0 | QTR1 | 234 |
2. Enhance | Communities | 0 | QTR2 | 123 |
2. Enhance | Communities | 0 | QTR3 | 345 |
2. Enhance | Communities | 0 | QTR4 | 111 |
Expected Output:
Description | Metric | Target | QTR2 value | Previous QTR Value |
1. Strenth Of Services | CS | 0 | 123 | 234 |
2. Enhance | Communities | 0 | 123 | 234 |
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.
Solved! Go to Solution.
pls try this
Sample PBIX file attached
Hi,
My preference would be to create a Date table. If you wish to take this approach, then please share/clarify the following:
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])
Thanks Ahmedx, Your solution worked for me😊.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
85 | |
79 | |
54 | |
39 | |
35 |
User | Count |
---|---|
102 | |
80 | |
48 | |
48 | |
48 |