Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Singhcooldeep
New Member

How to create two lines in a Line Chart

I want to create two lines in a Line Chart(Only Need the data where Age is 6 for the device)
1. First line should show the count difference of the Device from previous month where Age should be only 6
NOTE: To get the count difference for each month only last available date should be consider for that month, For Example: For the month of March the last available date is 20-03-2025, so only for 20-03-2025 where device Age is 6 should be consider for the count difference for March, not any prior date should be consider for the month.

2. Second line should show 'Expected Device Count' for the remaining month including the current month till 2025 where Age is 6
NOTE: Attached a raw file to work, however the actual data get refresh on random dates where new Device records add & some got removed.  
Now lest assume we have 700 Device which has Age 6 till 21-05-2025, so for the second line, the logic should be the
(Latest Device Count/Number of remaining months for the current year) which means 700/8= 87 Count should be appear from May to Dec 2025 and by the next month if count get increased or decreased, That supposed to be divide by 7 and so on till Dec.

Raw Data

1 ACCEPTED SOLUTION
v-venuppu
Community Support
Community Support

Hi @Singhcooldeep ,

Thank you for the Response..!!

I have done the changes as per the requirement by creating updated measures, please go through the attached pbix file and refer the second chart.

 

If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! 

Thank you.

View solution in original post

7 REPLIES 7
v-venuppu
Community Support
Community Support

Hi @Singhcooldeep ,

I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please accept it as a solution and give it a 'Kudos' so other community members with similar problems can find a solution faster.

Thank you.

v-venuppu
Community Support
Community Support

Hi @Singhcooldeep ,

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.

Thank you.

v-venuppu
Community Support
Community Support

Hi @Singhcooldeep ,

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thank you.

v-venuppu
Community Support
Community Support

Hi @Singhcooldeep ,

Thank you for the Response..!!

I have done the changes as per the requirement by creating updated measures, please go through the attached pbix file and refer the second chart.

 

If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! 

Thank you.

v-venuppu
Community Support
Community Support

Hi @Singhcooldeep ,

Thank you for reaching out to Microsoft Fabric Community.

I have created sample .pbix file by using the sample data to replicate the scenario.

You can go through the attached file for your reference.

 

If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! 

Thank you.

@v-venuppu Thank you for the help, I just made a little change in the 'DeviceCountDiff'
In RETURN statement i did 'PreviousCount - CurrentCount' & everyhting is working perfect for me just one thing that the 'DeviceCountDiff' line is also showing the data for June month however in my actual data i just have the data till 19-05-2025.(This data for June is actually the latest device count)

@v-venuppu Thank you for the help, It's almost working for me, Just one thing that My actual data is just till the current date however the 'DeviceCountDiff' is showing data for the June also(Which is actually the Device Count of the latest Date)

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors