Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowTry your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now
Hi
I have a visual which basically shows this (sales for each department and status of approval, only for the last three days):
| Department | No. Of Sales | Status | Date |
| Dept. 1 | 8 | Approved | 16.09.2021 |
| Dept. 1 | 2 | Not approved | 16.09.2021 |
| Dept. 2 | 11 | Approved | 16.09.2021 |
| Dept. 3 | 4 | Approved | 16.09.2021 |
| Dept. 1 | 5 | Approved | 15.09.2021 |
| Dept. 2 | 8 | Approved | 15.09.2021 |
| Dept. 3 | 7 | Approved | 15.09.2021 |
| Dept. 3 | 1 | Not approved | 15.09.2021 |
| Dept. 1 | 4 | Approved | 14.09.2021 |
| Dept. 2 | 3 | Approved | 14.09.2021 |
| Dept. 3 | 9 | Approved | 14.09.2021 |
What I'm trying to figure out how to filter this so that it shows the complete results for yesterday (16.09.21) regardless of sales being approved or not. And for all other dates it only shows rows where sales aren't approved. Which would be this:
| Department | No. Of Sales | Status | Date |
| Dept. 1 | 8 | Approved | 16.09.2021 |
| Dept. 1 | 2 | Not approved | 16.09.2021 |
| Dept. 2 | 11 | Approved | 16.09.2021 |
| Dept. 3 | 4 | Approved | 16.09.2021 |
| Dept. 3 | 1 | Not approved | 15.09.2021 |
| Dept. 2 | 2 | Not approved | 14.09.2021 |
Been trying to write a measure to add to filters, but can't seem to find the correct formula.
Regards
MadBern
Solved! Go to Solution.
@MadBern85 You seem to need a Complex Selector: The Complex Selector - Microsoft Power BI Community
Maybe:
Selector Measure =
VAR __Yesterday = TODAY() - 1
RETURN
SWITCH(TRUE(),
MAX([Date]) = __Yesterday,1,
MAX([Status] = "Not approved",1,
0
)
@MadBern85 You seem to need a Complex Selector: The Complex Selector - Microsoft Power BI Community
Maybe:
Selector Measure =
VAR __Yesterday = TODAY() - 1
RETURN
SWITCH(TRUE(),
MAX([Date]) = __Yesterday,1,
MAX([Status] = "Not approved",1,
0
)
Thanks a bunch, that seemed to do the trick! Only had to add the missing ")" after the second MAX statement.
Regards
MadBern
@MadBern85 Ah yes, the syntax... 🙂
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 22 | |
| 21 | |
| 21 | |
| 20 | |
| 13 |
| User | Count |
|---|---|
| 59 | |
| 53 | |
| 40 | |
| 31 | |
| 26 |