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

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.

Reply
cheny134
Frequent Visitor

How to compare YTD and monthly data in same chart?

I have a dataset like this.

 

DatePcsSize
2019/1/1100S
2019/2/1200S
2019/3/1300L
2019/4/1100L
2019/5/1200L
2019/6/1300L
2019/7/1100M
2019/8/1200M
2019/8/5300S
2019/8/10100L

 

How do I create a chart like this to comapre the % of Size (by pcs) in terms of specific month and YTD?

For example, in Aug --> S: 50%, M: 33%, L: 16%

                          YTD--> S: 32%, M: 16%, L: 53%

StackBarChart_YTD_Month.png

Thank you.

2 REPLIES 2
Greg_Deckler
Super User
Super User

You will likely need to use the Disconnected Table Trick for this as this article demonstrates: https://community.powerbi.com/t5/Community-Blog/Solving-Attendance-with-the-Disconnected-Table-Trick...


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Hi Greg,

 

Thanks for your reply. But I don't know how to apply Disconnected Table in my case. Can you give me more guidence? Tahnk you!

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.