Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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😊.
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.