Calculating current & prior year quarter measure dynamically with separate slicer for month and year
I'm very new to Power BI, appreciate it if you could help me find the solution. My scenario is I need to calculate the total sum of a measure for the current and previous year quarter, please see below snip but the problem is there are two separate slicers one for FISCAL MONTH and other for YEAR. So the requirement is when a user selects any month and year in the slicer the total sum would be the sum for the quarter to which the month falls to.
For example if i selct Month( July), Year 2022, i should get values for first quarter(i.e. July, Aug, Sep) of 2022 and 2021 under column name QTD and QTD PY. below is the formula i have used.
Thanks for your response but for previous year quarter it is not working. please see below snip.
For example if i select year 2022 and month Jul, i should be able to see current and previous year quartern i.e. ( Jul, Aug and Sep) quarter value for 2022 and 2021.below formula is not working for QTD PY