cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JiriS
Helper I
Helper I

Create row for each week in daterange

Hi,

 

I want to create a report. I have dataset and by using DAX I change the dataset to the format I need.

Than it looks like that: 

NamePersonal numberDate fromDate toDepartmentType
Peter12141212.08.202024.09.2020

D1

X
George12151624.12.201901.02.2020D2X
George12151601.03.202005.08.2020D1Y

 

By using DAX I need to create this table:

NamePersonal numberDepartmentTypeWeekYear
Peter121412D1X332020
Peter121412D1X342020
Peter121412D1X352020
Peter121412D1X362020
Peter121412D1X372020
....     

It means that I want to have for each week between daterange (from-to) one row.

How can I do that?

 

Thank you,

George

1 ACCEPTED SOLUTION
amitchandak
Super User IV
Super User IV

@JiriS, I've done it for Dates in this file.

https://www.dropbox.com/s/bqbei7b8qbq5xez/leavebetweendates.pbix?dl=0

If you can week and year on your calendar. You should be able to group in the year of the week



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

2 REPLIES 2
amitchandak
Super User IV
Super User IV

@JiriS, I've done it for Dates in this file.

https://www.dropbox.com/s/bqbei7b8qbq5xez/leavebetweendates.pbix?dl=0

If you can week and year on your calendar. You should be able to group in the year of the week



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

Thank you for your solution.

George

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

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.

Get Ready for Power BI Dev Camp

Power BI Dev Camp - September 30th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors