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
erdinch
Helper I
Helper I

How to slice based on week when there is no calendar day?

Hello,

I am working on a power bi report that is showing data on a montly bases.

I received request to present that data on a weekly bases.

Unfortunately I am not able to do it ( with the knowledge I have).

The problem is that in the source file I have column Fiscal year/peroiod that represents the month. (in that column I do not have the calendar date-just month)

Then I have week of the year...and the other data that is used to calculate KPI.

 

My date table is having all needed atributes and relation is done between calendar day in that table with Fiscal year/period.When I want to slice the measure on a weekly bases (for example January)-graph is showing data for W1. Weeks 2,3,4 are empty.

So how I can show weekly data when in the source file I am having the week number but not having the calendar date? 

4 REPLIES 4
Greg_Deckler
Super User
Super User

Here is an example of where I reverse engineered the Day Number of a Year. You should be able to do something similar. https://community.powerbi.com/t5/Quick-Measures-Gallery/Day-Number-of-Year-and-Working-Day-Number-of...

 

Sample data would help. 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


@ 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...
amitchandak
Super User
Super User

@erdinch ,if you can provide a week format. We can get date based on that.

This one example we converted week into the date . I think this was YYYYWW format

Weektodate = date(RIGHT('Date'[Week Format],4),1,1)+(mid('Date'[Week Format],5,SEARCH(" ",'Date'[Week Format])-5 )*7) - (WEEKDAY(date(RIGHT('Date'[Week Format],4),1,1)))

Then you can join it with date dimension and use.

 

Does the above reply helps? if you need more help mark me @

Appreciate your Kudos.

Hello,

That is a pic of the quiery where I have my Fiscal year (Jan, 2019 is presented as 01/01/2019), Month (presented as MMM) and number of week in the year (WW.YYYY)

Capture.JPG

So could you please show me how to ad a column that will represent calendar date based on column for fiscal year or wek of year?

VijayP
Super User
Super User

in the source file try to create a date column based on the year and month information available . Then  you can create relation ship with Calenderdim file with source file ( Date in Dim file to New Date Column Created in Source File)

if still you have issue please let me have the data (atleast) one row so taht i can create a quick video for you.

Vijay Perepa

 

If this is solving your problem, please mention this as solution and give your Kudos

Watch my Power BI Videos at https://www.youtube.com/perepavijay

 




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


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.