cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Period To Card Calculated Card

Hello, 

 

I have been spinning my wheels on this one and it should be easy. 

 

I have 2 tables one data, and one date. The Data table contains a date feild that should match to a date range provided in the date Table, which classifies that date to a week, period, and year. When I select my week, I should be able to automatically return the period the week is in and calculate my total period costs over my total period units. 

 

I have tried this several ways however I am not coming to correct values. 

 

Table Creation:

Finance - Calculated PTD = SUMMARIZE('Data - Finance','Period Chart'[Year],'Period Chart'[Period],'Data - Finance'[Attribute],"PTD Balance",sum('Data - Finance'[Value]))
 
Column Creation:
PTD Values = CALCULATE(SUM('Finance - Calculated PTD'[Value]))/CALCULATE(SUM('Finance - Calculated PTD'[Value]),'Finance - Calculated PTD'[Attribute]="Throughput")
 
I haven't had either of these work as intended.
 
 
Capture.JPG
 
Date Table.JPG

  

 

 
 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User IX
Super User IX

Re: Period To Card Calculated Card

@bhead , Assuming you are calling the second one is date table . Create a date table with calendar with all dates. You can have week of you choice . And join Date to date

Example

Week Number = WEEKNUM([Date],2) // Monday week, for other refer by blog

Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1
Week End date = 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],2)

Week = if('Date'[Week Number]<10,'Date'[Year]*10 & 'Date'[Week Number],'Date'[Year]&'Date'[Week Number])
Week Rank = RANKX(all('Date'),'Date'[Week Start date],,ASC,Dense)
Week name = [Week Start date] & " to "& [Week End date]
Weekday = WEEKDAY([Date],2)
WeekDay Name = FORMAT([Date],"ddd")

Any Weekday Week

https://community.powerbi.com/t5/Community-Blog/Any-Weekday-Week-Decoding-Date-and-Calendar-2-5-Powe...

 

You can group data by week.

Also, refer

https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-La...



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

1 REPLY 1
Highlighted
Super User IX
Super User IX

Re: Period To Card Calculated Card

@bhead , Assuming you are calling the second one is date table . Create a date table with calendar with all dates. You can have week of you choice . And join Date to date

Example

Week Number = WEEKNUM([Date],2) // Monday week, for other refer by blog

Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1
Week End date = 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],2)

Week = if('Date'[Week Number]<10,'Date'[Year]*10 & 'Date'[Week Number],'Date'[Year]&'Date'[Week Number])
Week Rank = RANKX(all('Date'),'Date'[Week Start date],,ASC,Dense)
Week name = [Week Start date] & " to "& [Week End date]
Weekday = WEEKDAY([Date],2)
WeekDay Name = FORMAT([Date],"ddd")

Any Weekday Week

https://community.powerbi.com/t5/Community-Blog/Any-Weekday-Week-Decoding-Date-and-Calendar-2-5-Powe...

 

You can group data by week.

Also, refer

https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-La...



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

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Upcoming Events

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

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

Top Solution Authors