Skip to main content
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
nchamilton162
New Contributor II

Power BI Matrix

Good afternoon,

I'm attempting to create a Matrix with my project, projectphase and then a span of dates across the top as my column/s that represent the first of each workweek spanned between my start and end date of each phase of my projects. I would like to place a value or 1 in the column for the start of each week that falls between my start and end dates. See screenshots below. It's sort of working, except my start of my week is off by one week in the future. For example. If you look at the "ProjectPhaseSort Name of "100 Planning", I would expect to see 3/18, 3/25, 4/1 (see table below to verify the dates "Date" and "WorkWeekStart") across the columns, each with a 1 in the column.  Any idea why my Work Week Start is in the future? and why is it cutting off my 4/1 workweekstart date for Planning for example. 

nchamilton162_2-1730835996054.png

 

Here is my workweekstart formula. 

nchamilton162_1-1730835912922.png

 

Here is my "CF  Gannt" measure dax formula.

CF Gantt =
VAR StartDate =
    CALCULATE(MIN(TM_ProjectPhases[EstStartDate]),
    REMOVEFILTERS('Calendar')
    )
   
VAR EndDate =
    CALCULATE(MIN(TM_ProjectPhases[EstEndDate]),
    REMOVEFILTERS('Calendar')
    )
VAR Period =
    MIN('Calendar'[Date])>=StartDate && MAX('Calendar'[Date])<=EndDate

VAR Result =
    If(Period,1)
   
RETURN
Result

 

Here is my model

nchamilton162_3-1730836046834.png

 

Thanks



1 REPLY 1
lbendlin
Esteemed Contributor III

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information. Do not include anything that is unrelated to the issue or question.

Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
Users online (27)