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.
Hello,
Hope everyone is having a nice day.
Would someone be able to help me with a DAX formula please?
I would like the DAX formula to do 2 things:
1. Calculate the Min Open Date if
1. Status is not Void
2. Type is Accepted
2. Then count the number of Min Open Date greater or equal to 3
Would anyone be able to help me please?
Thanks
Solved! Go to Solution.
Hi @Anonymous
please try
=
SUMX (
VALUES ( 'Table'[Name] ),
VAR CurrentNameTable =
CALCULATETABLE ( 'Table' )
VAR FilteredTable =
FILTER (
CurrentNameTable,
'Table'[Status] = "Open"
&& 'Table'[Type] = "Accepted"
)
VAR StartDate =
MAXX ( CurrentNameTable, 'Table'[Start Date] )
VAR OpenDate =
MINX ( FilteredTable, 'Table'[Open Date] )
RETURN
IF ( DATEDIFF ( StartDate, OpenDate, DAY ) > 3, 1 )
)
Hi @Anonymous
please try
=
SUMX (
VALUES ( 'Table'[Name] ),
VAR CurrentNameTable =
CALCULATETABLE ( 'Table' )
VAR FilteredTable =
FILTER (
CurrentNameTable,
'Table'[Status] = "Open"
&& 'Table'[Type] = "Accepted"
)
VAR StartDate =
MAXX ( CurrentNameTable, 'Table'[Start Date] )
VAR OpenDate =
MINX ( FilteredTable, 'Table'[Open Date] )
RETURN
IF ( DATEDIFF ( StartDate, OpenDate, DAY ) > 3, 1 )
)
hi @Anonymous
what do you mean by "count the number of Min Open Date greater or equal to 3", could you elaborate it?
Hi @FreemanZ,
Sorry about that, find the # of days between Start Date and Min Open Date and if its Greater or equal to 3 then count the number of names.
User | Count |
---|---|
25 | |
12 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
12 | |
11 | |
9 | |
6 |