The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi frinds,
I have below fields
Product | Amount | Date_Time |
A | 10 | 6/23/20 12:10:10 |
B | 20 | 6/23/20 12:10:10 |
C | 30 | 6/23/20 12:10:20 |
D | 40 | 6/23/20 12:40:30 |
A | 40 | 6/22/20 12:10:50 |
B | 120 | 6/22/20 12:00:24 |
C | 60 | 6/22/20 12:00:10 |
D | 100 | 6/22/20 12:10:00 |
Based on the Time Stamp how to calculate current and Previous amount for the Products dynamically.
C | 30 | 6/23/20 12:10:20 |
D | 40 | 6/23/20 12:40:30 |
Product D should be the Current and Product C should be previous. Please help how to calculate dynamically.
Please help
Thanks & Regards,
Solved! Go to Solution.
@BhavyaM , create descending column rank on datetime and filter for 2.
For Rank Refer these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale
https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/3...
@BhavyaM , create descending column rank on datetime and filter for 2.
For Rank Refer these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale
https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/3...
Thanks it worked 👍