I have the following requirement where i need to show current and previous fiscal quarter comparision in Line chart.
My fiscal Year calendar is from July to June, So if i consider today i am in Q4 quarter and i need to compare Q4 with Q3.
Now i am using line chart and i am giving Month name in x axis and Current and prev quarter sales measures in Y axis. But since the quarters are different and months within each quarter are different i am seeing that the lines are not overlappiing and doesnt give me the Jist of comparision. Is there any way we can achieve this.
Added sample image for reference.
I am confused, If you want quarter wise comparison, then why are you dragging Months to the X-axis. As if this was not enough, in the image you are showing weeks on the X-axis. What exactly do you want?
The image is just for reference The requirement is to bring in Months to the X-axis instead of weeks.
I need to compare my current and previous quarter sales to overlap. Is there any way we can achieve this? Please let me know.
Share some data to work with and show the result in a simple Table format. Once we get the correct results in a Table, we can prepare whatever visual we want.
Please see the link below for sample data. Please let me know if this helps.
Access Denied message.
Sorry! My bad. Can you please try now
You may download my PBI file from here. You may drill down on the X-axis to see months on the X-axis as well.
Hope this helps.
Thank you for your response. But, the requirement to compare my current and previous quarter sales to overlap. To showcase current and previous one over the other, not side by side. (as shown in reference first image)
Technically i don't think that is possible because the quarters have different months so the moment you drag Months to the x axis, the continuty for quarters breaks. If you drag Quarters to the Legend, then this is what you get.
Thank you for your time in replying back. Below are the details as requested.
Current Quarter sales : Calculate (sum(sales), filter ( date, date(quarter number) = current fiscal quarter]))
Previous Quarter sales: Var prev_quarter = [current fiscal quarter] - 1
calculate (sum(sales), filter (date, date[quarter number] = prev_quarter
X-axis = Fiscal Short Month Name ( jan, feb, mar, etc. )
Y- axis = Current Quarter sales, Previous Quarter sales.
The above is the measure and calculations used. Could you please check and let me know if you need anything else.
Appreciate your time and help.
@Puneethj This is all going to come down to how you construct your measure for previous quarter. You can make it appear in the current quarter via DAX. Unfortunately, there's not enough information in this to really be specific around how to accomplish this.
Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
Check out the changes to the Power BI Community announced at Build.
Find out more about the May 2023 update.
Visit our Data Stories Gallery and give kudos to your favorite Data Stories.