Forum Discussion
brianlehr
Microsoft Employee
6 years agoBurnup Chart Based on Known Completion Dates
Hi all, trying to do something which I think is relatively simple but I can't wrap my mind around it. I'm already using a countrows measure to determine current % completion I want to use a sim...
- 6 years ago
Hi brianlehr ,
I have created a sample for your reference, please check the following steps as below.
1. Create a calculated table like that.
Table = CROSSJOIN(DISTINCT('Set 1'[Site ]),UNION(DISTINCT('Set 1'[Date]),DISTINCT('Set 2'[Date])))2. Based on that, create the two calculated columns as below.
Column = VAR dat = [Date] VAR s = [Site ] RETURN LOOKUPVALUE ( 'Set 1'[Finished], 'Set 1'[Date], [Date], 'Set 1'[Site ], [Site ] ) + CALCULATE ( MAX ( 'Set 2'[Finished] ), FILTER ( 'Set 2', 'Set 2'[Date] = dat && 'Set 2'[Site ] = s ) )Column 2 = CALCULATE ( MAX ( 'Table'[Column] ), FILTER ( 'Table', 'Table'[Site ] = EARLIER ( 'Table'[Site ] ) && 'Table'[Date] <= EARLIER ( 'Table'[Date] ) ) )3. Then we can get the excepted result by this measure.
Measure = DIVIDE( CALCULATE(COUNTROWS('Table'),FILTER('Table','Table'[Column 2]=1)),CALCULATE(COUNTROWS('Table')))For more details, please check the pbix as attached.
v-frfei-msft
Community Support
6 years agoHi brianlehr ,
I have created a sample for your reference, please check the following steps as below.
1. Create a calculated table like that.
Table = CROSSJOIN(DISTINCT('Set 1'[Site ]),UNION(DISTINCT('Set 1'[Date]),DISTINCT('Set 2'[Date])))
2. Based on that, create the two calculated columns as below.
Column =
VAR dat = [Date]
VAR s = [Site ]
RETURN
LOOKUPVALUE (
'Set 1'[Finished],
'Set 1'[Date], [Date],
'Set 1'[Site ], [Site ]
)
+ CALCULATE (
MAX ( 'Set 2'[Finished] ),
FILTER ( 'Set 2', 'Set 2'[Date] = dat && 'Set 2'[Site ] = s )
)
Column 2 =
CALCULATE (
MAX ( 'Table'[Column] ),
FILTER (
'Table',
'Table'[Site ] = EARLIER ( 'Table'[Site ] )
&& 'Table'[Date] <= EARLIER ( 'Table'[Date] )
)
)
3. Then we can get the excepted result by this measure.
Measure = DIVIDE( CALCULATE(COUNTROWS('Table'),FILTER('Table','Table'[Column 2]=1)),CALCULATE(COUNTROWS('Table')))
For more details, please check the pbix as attached.
- brianlehr6 years ago
Microsoft Employee
This is perfect. It's the EARLIER that always screws up my thinking. 😀