Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Morning All
Im looking for some handholding and this says more about my DAX skils than anythoing. But if you dont know; you dont know.
Context: This table tbl_POAP_master[Days Till Due Date is a number coumn which is essentially a countdown to the due date. So every day this will shift left by 1. Something like Days Till Due Date = DATEDIFF(today(), tbl_POAP_master[Due Date],DAY)
.All is good with this and thats not my main problem.
My challenge is I want a calculated column based on these numbers so I wrote this:
Now if I unfilter blanks in above you will see Blanks are showing as Amber. But Amber is my "due in less than 10x days" and I dont want that.
I dont know why its doing this but Im sure somehow I can wrap this with some statement for blanks or have a if treatment for blanks.
Just to say they really are blank columns and not just empty
Thanks for all the support Ive been getting with some lame queestions. Im not a PBI UI SME or develoepr but Ive gained enough insight to transform reporting within a 20+ person team.
Comments welcome.
Jimmy
Solved! Go to Solution.
@Anonymous , First handle is blank and give a value
example
DUE RED AMBER GREEN =Switch(true() ,
isblank(tbl_POAP_master[Days Till Due Date]) , "Yellow"
tbl_POAP_master[Days Till Due Date] < 0, "RED",
tbl_POAP_master[Days Till Due Date] <= 10, "AMBER",
tbl_POAP_master[Days Till Due Date] <= 30, "BLUE",
"Future Due Date"
)
thanks @amitchandak It worked a treat. I even spotted a missing comma on the code you supplied. 🙂
Much better than a multiple if which I would imagine would also affect performance.
Question: The Slicer I have displays options in a drop down as per Figure 1.
Fig 1
The DAX is as follows:
@Anonymous , First handle is blank and give a value
example
DUE RED AMBER GREEN =Switch(true() ,
isblank(tbl_POAP_master[Days Till Due Date]) , "Yellow"
tbl_POAP_master[Days Till Due Date] < 0, "RED",
tbl_POAP_master[Days Till Due Date] <= 10, "AMBER",
tbl_POAP_master[Days Till Due Date] <= 30, "BLUE",
"Future Due Date"
)
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 38 | |
| 36 | |
| 30 | |
| 28 |
| User | Count |
|---|---|
| 128 | |
| 88 | |
| 79 | |
| 67 | |
| 62 |