Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
Do anyone have idea on how to store the previous year value and previous quarter value & next year value and next quarter value from current date in measure.
Tried using previousyear and previousquarter dax functions. It doesn't work according to my need.
Please help.
Thanks in advance.
Hi, @AishwariyaV
I recommend you check the post first:How to Get Your Question Answered Quickly - Microsoft Power BI Community
Your requirement is simple to achieve, But you need to share some sample fake data and how you want to display it in the report. So we can help you soon.
Best Regards
Janey Guo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @AishwariyaV
Have you got sample data? Please show your tables. Or a PBIX file?
Is the year text or a number? Are you using a Date Table? How have you created the quarters e.g. Q4 etc?
Phil
Proud to be a Super User!
Hi @AishwariyaV
You haven't provided any sample data so any answer you get will be a general one. You haven't said what values you are trying to calculate. Nobody can write DAX for you that won't need changing, without knowing the structure of your data.
Regards
Phil
Proud to be a Super User!
Current year = 2021
current qtr = Q1
IFNULL(SUM((CASE
WHEN
(Quarter = 'Q4' {Prev qtr from current date} AND Year = '2020' {Prev year from current date})
THEN Sales END)), 0) AS Sales_For_PrevQtr
This is the calculation i am trying to bring in power bi
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
105 | |
105 | |
88 | |
73 | |
66 |
User | Count |
---|---|
124 | |
113 | |
98 | |
81 | |
72 |