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

Need help with a Monthly value to repeat when showing data by week

The starting day of week is from my calendar table.  My Headcount source is only monthly but I need to show data by week.

I have a Month/year in both sources that can be used to join, it's an inactive join because the active join is on the actual date (for other reports tied to this source).

As you can see, my calculation is not correct and summing all the months and not repeating just that matching month.

So in the view below, for example for 1st 4 lines, i want the value to be the 1871.  Next month, i want the value to be the 1894.

 
 
HC Weekly = VAR _HCWeekly = SELECTEDVALUE('Calendar'[Starting Day of Week])
Return
CALCULATE(Sum(HeadcountPSWDSummary[HeadCount]),
Filter(ALLSELECTED(HeadcountPSWDSummary),
Year(HeadcountPSWDSummary[Data Date] = Year(_HCWeekly) && Month (HeadcountPSWDSummary[Data Date] = _HCWeekly))))

 

I had tried a 2nd calc that gives the same values showing in the Headcount column

HC Weekly 2 = CALCULATE([Total HC],USERELATIONSHIP('Calendar'[Year Month],HeadcountPSWDSummary[Year Month]))

lasmithfla_0-1665581569522.png

 

1 REPLY 1
v-luwang-msft
Community Support
Community Support

Hi  @lasmithfla ,

Please provide sanitized sample data that fully covers your issue.
Please show the expected outcome based on the sample data you provided.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523 

 

 

Best Regards

Lucien

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.