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
vannipart
Frequent Visitor

Show two years data with only week number ?

So I have a stacked column chart, where I would like to have two years of data shown with only week number. But Power bi doesn't understand the difference, because week numbers aren’t unique. What would be the smartest solution for figuring that out. Ordering won’t work, neither in database side or in Powerbi. 

Picture 1 is the situation where I have both years week number, but I don't have week 44 data yet but i shows that i have that, its from 2016. And Picture 2 is where I have the unique data, but the visual look is terrible and hard to read. 

Any good ideas?

picture1.pngpicture2.png

6 REPLIES 6
Eric_Zhang
Employee
Employee

@vannipart

Maybe use DrillDown in Power BI. See attached pbix demo.

drilldown2.gif

Interesting suggestion, unfortunately this won't help me. I want to see the last year and this year data in the same chart. Thank you @Eric_Zhang!


@vannipart wrote:

Interesting suggestion, unfortunately this won't help me. I want to see the last year and this year data in the same chart. Thank you @Eric_Zhang!


@vannipart

Then create column as below and the picture 2 in your original post in the only approach.

YearWeek = CONCATENATE(yourTable[Year],RIGHT(CONCATENATE(0,yourTable[weekNo]),2))

Readability, which is the most importan thing. Our data is right now like this(see picture3) But is it hard to read from it, for the end user, thats why I'm looking for a solution to show week number. But thank you for your effort @Eric_Zhang

picture3.png

miltenburger
Helper V
Helper V

Maybe use a clustered column chart? so filter on year and week

hope this helps you out

Thank you @miltenburger for you suggestion, this didn't work unfortunately. 

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.