Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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... 🙂
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
63 | |
63 | |
53 | |
39 | |
25 |
User | Count |
---|---|
85 | |
57 | |
45 | |
43 | |
38 |