cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PBI-Curious
Resolver I
Resolver I

Creating Line Chart in Power BI comparing Prior Year vs. Current Year by day

Good Day All

I'm trying to create a line chart in PBI that shows PY vs. CY usage for a product by day of the month on the same line chart. Screen Shots below

 

Thank you in advance for your time.

 

klsmith_dnb_0-1621528868896.png

klsmith_dnb_1-1621529494601.png

 

 

1 ACCEPTED SOLUTION
PBI-Curious
Resolver I
Resolver I

Hi Hasham

You are the man! Can believe we accomplished this via screen shost. In the future, can I send a demo PBIX. to make thing easier? If so, how would I go about it? I know I can use Dropbox or Google Drive, but not clear on every step to get it done.

Much appreciate you help today.

 

Thank you

 

klsmith_dnb_0-1621553802025.png

 

View solution in original post

8 REPLIES 8
PBI-Curious
Resolver I
Resolver I

Hi Hasham

You are the man! Can believe we accomplished this via screen shost. In the future, can I send a demo PBIX. to make thing easier? If so, how would I go about it? I know I can use Dropbox or Google Drive, but not clear on every step to get it done.

Much appreciate you help today.

 

Thank you

 

klsmith_dnb_0-1621553802025.png

 

View solution in original post

PBI-Curious
Resolver I
Resolver I

Hi Hasham

I'm I missing something per your instructions. How can I send you my PBIX. Demo Data?

klsmith_dnb_0-1621553205751.png

 

Hi @PBI-Curious !

You are almost there, now in your axis date has 4 element, Year, Quarter, Month & Day. Remove (Just click in [x] icon next to) Year, Quarter & Month, you will be left with Day element. This will let you analyze the CY vs PY sales at day level.

 

Regards,

Hasham

PBI-Curious
Resolver I
Resolver I

Hasham

Moving Product out allowed me to add in PY MTD and CY MTD in the value section. Here is the output

klsmith_dnb_0-1621541183578.png

 

 

Hi @PBI-Curious !

Now you can try to put only Day element from Date hierarchy as shown in earlier image. You can have Year & Month available as slicer value.

 

Regards,

Hasham

PBI-Curious
Resolver I
Resolver I

Hi Hasham

Initially moving CY MTD to the visual that's where it landed in the Tooltips sectioin. Moving CY MTD to Values replaced PY MTD. Do you have any other suggestions?

Much appreciate your help!

 

klsmith_dnb_0-1621539922879.png

 

Hi @PBI-Curious !

You can move Prodcut out of [Legend] to be able to compare, 2 or more KPI's in Line Chart. You can look for matrix or other visuals which will alow you to plot multiple values against category & axis.

 

Regards,

Hasham

HashamNiaz
Solution Sage
Solution Sage

Hi @PBI-Curious !

 

Currently you have placed your CY measure in tooltip, kindly move it to values section for Line chart, so both PY & CY measure lines can be plotted next to each other. For Date to show as Day number please click on down arrow next to Date in Line Chart & change it from Date to Date Hirarchy and select Day as element. See the image below;

 

DateDate

 

Regards,

Hasham

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.