cancel
Showing results for
Did you mean:
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.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
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

Proud to be a Super User!

Highlighted
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

Proud to be a Super User!

Announcements

#### Power Platform Community Conference

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

#### Experience what’s next for Power BI

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

#### Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021