Forum Discussion
First occurence based on two filters
- 4 years ago
- 4 years ago
Hello mihaita_baro
You can create a column like this:
KPI_5 = VAR a = IF ( COUNTX ( FILTER ( ALL ( 'Table' ), [ID] = EARLIER ( 'Table'[ID] ) ), [ID] ) >= 2, 1 ) RETURN IF ( a = 1 && [APPTYPE] IN { 2, 3, 5 } && [ATTENDANCE] IN { 5, 6, BLANK () }, 1 )Did I answer your question ? Please mark my reply as solution. Thank you very much.
If not, please feel free to ask me.Best Regards,
Community Support Team _ Janey
mihaita_baro try this measure
First Appt =
VAR __date =
CALCULATE (
MAX ('Table'[APPOINTMENT] ),
TOPN (
1,
FILTER ( ALLEXCEPT ('Table','Table'[ID] ), 'Table'[ATTENDANCE] IN { 5, 6 } && 'Table'[APPTYPE] IN { 2, 3, 5 } ),
MAX ('Table'[APPOINTMENT] ),
ASC
)
)
RETURN
IF ( MAX ('Table'[APPOINTMENT] ) = __date, 1 ) + 0
✨ Follow us on LinkedIn
Learn about conditional formatting at Microsoft Reactor
My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
- mihaita_baro4 years agoHelper II
Hi
Thanks for your help but nothing comes up, it's all blank.