I have the below dax pattern for showing blanks in a measure:
For example, if i worked 1 day in Feb and 1 day in June then the output might be:
Jan: 0
Feb: 1
Mar: 0
Apr: 0
May: 0
Jun: 1
Jul: 0
Aug: 0
Sep: 0
Oct: 0
Nov: 0
Dec: 0
This works well for graphs and whatnot but the issue I'm now facing is I need to show blanks, like above, but only between the start date and end date of the measure in question. Therefore, the output should be:
Feb: 1
Mar: 0
Apr: 0
May: 0
Jun: 1
Any suggestions?
I imagine it would be something like :
Code:
Count of Days Worked (no blanks):=IF(ISBLANK([Count of Days Worked]), 0, [Count of Days Worked])
Jan: 0
Feb: 1
Mar: 0
Apr: 0
May: 0
Jun: 1
Jul: 0
Aug: 0
Sep: 0
Oct: 0
Nov: 0
Dec: 0
This works well for graphs and whatnot but the issue I'm now facing is I need to show blanks, like above, but only between the start date and end date of the measure in question. Therefore, the output should be:
Feb: 1
Mar: 0
Apr: 0
May: 0
Jun: 1
Any suggestions?
I imagine it would be something like :
Code:
Count of Days Worked (timeframe):=CALCULATE ( [Count of Days Worked (no blanks)],
FILTER (
ALL ( 'Date Table' ),
'Date Table'[DateInt] >= CALCULATE ( MIN ( 'Date Table'[DateInt] ), 'Fact Table' ) && 'Date Table'[DateInt] <= MAX CALCULATE ( MAX ( 'Date Table'[DateInt] ), 'Fact Table' )
)
)
Last edited: