Forum Discussion
Anonymous
7 years agoNot applicable
Measures with Date Tables
Hi, I am very new to Power BI and I am having trouble using a measure with a date table. I created a date table for looking up Dates = CALENDAR(TODAY()-1000,TODAY()+1000) within which I ...
- 7 years ago
Anonymous sorry missed a bracket
SLA % = VAR d = DIVIDE ( SUM ( Table1[Incident Breached] ), SUM ( Table1[Count]) ) RETURN IF (ISBLANK(d), BLANK(),1-d)
parry2k
Super User
7 years agoAnonymous did you setup relationship between your date and transaction table?
- Anonymous7 years agoNot applicable
Wow, that was quick :-) Thanks for getting back to me parry2k
Yes, I think(?) I have
Here you can see two charts, both are using the same MonthYear axis
But the one in the left (which does not use a measure) seems to work fine.
- mussaenda7 years ago
Community Champion
try setting your relationship direction to both
- parry2k7 years ago
Super User
Anonymous problem is your measure is returning 1 when there is no value in divided by and that's why you are seeing all the dates. I wouldn't recomment to set the relationship to both direction since it can have performances issue on large dataset.
try following
SLA % = VAR d = DIVIDE ( SUM ( Table1[Incident Breached] ), SUM ( Table1[Count]) RETURN IF (ISBLANK(d), BLANK(),1-d)