Forum Discussion
How to Maintain Submission Window Context
- 1 year ago
I added a blank check field using this DAX:
Blank Check = DISTINCTCOUNT('Submitted Documents'[Form ID]) & IF( ISBLANK(SELECTEDVALUE('Submitted Documents'[Date Submitted])), "No Submission", " Submitted" )The color formatting DAX is now:
Submission Window = VAR inWindow = IF( SELECTEDVALUE('Calendar'[Weekday Num]) >= 1 && SELECTEDVALUE('Calendar'[Weekday Num] ) <= 3, TRUE(), FALSE() ) VAR color = SWITCH ( TRUE(), inWindow, "Green", "Red" ) RETURN colorThis leads to this result with some aggregation on Submitter:
It's starting to look much closer to what I'm trying to achieve. However, if I change "No Submission" to Blank(), which looks much nicer, the color drops again. To fix that I used "" instead of Blank(). I'll try to go with this compromise for now, but I'd love to hear if you or anyone else knows why my conditional formatting disappears when values on the many side of the relationship are included but are all blank:
Thank you!
Easiest way to tell would be to create another measure in the visual which returns
ISBLANK(SELECTEDVALUE('Submitted Documents'[Date Submitted]))I added a blank check field using this DAX:
Blank Check =
DISTINCTCOUNT('Submitted Documents'[Form ID]) &
IF(
ISBLANK(SELECTEDVALUE('Submitted Documents'[Date Submitted])),
"No Submission",
" Submitted"
)The color formatting DAX is now:
Submission Window =
VAR inWindow =
IF(
SELECTEDVALUE('Calendar'[Weekday Num]) >= 1 &&
SELECTEDVALUE('Calendar'[Weekday Num] ) <= 3,
TRUE(),
FALSE()
)
VAR color =
SWITCH (
TRUE(),
inWindow, "Green",
"Red"
)
RETURN
colorThis leads to this result with some aggregation on Submitter:
It's starting to look much closer to what I'm trying to achieve. However, if I change "No Submission" to Blank(), which looks much nicer, the color drops again. To fix that I used "" instead of Blank(). I'll try to go with this compromise for now, but I'd love to hear if you or anyone else knows why my conditional formatting disappears when values on the many side of the relationship are included but are all blank:
Thank you!