Forum Discussion
MikeDubya
3 years agoHelper I
Getting a specific date value based on another columns value
Hello all, First time poster, long time reader. I have a set of data that I need to get a specific date out of and I am just not getting what I need. Here is a basic snippit of the data: ...
FreemanZ
3 years agoSuper User
hu MikeDubya
try to plot a measure like:
Measure =
VAR _table=
CALCULATETABLE(
VALUES(TableName[Col1]),
TableName[Col2]=1
)
VAR _top3 =
TOPN(3, _table, TableName[Col1] )
VAR _top2=
TOPN(2, _table, TableName[Col1] )
RETURN
EXCEPT(_top3, _top2)
- MikeDubya3 years agoHelper I
This works great! The only thing left is to add 90 days to the result that the above gives. I set the "EXCEPT(_top3, _top2)" to a variable called final ( which worked fine if I just put final after RETURN) and then tried DATEADD(final, 90, DAY) but it just gave me a blank result. Thoughts? Should I add the 90 to another variable?
- FreemanZ3 years agoSuper User
hi MikeDubya
Sorry i misconsidered that last point. try like:Measure =VAR _table=CALCULATETABLE(VALUES(TableName[Col1]),TableName[Col2]=1)VAR _top3 =TOPN(3, _table, TableName[Col1] )VAR _top2=TOPN(2, _table, TableName[Col1] )RETURNEDATE(EXCEPT(_top3, _top2), 3)- MikeDubya3 years agoHelper I
That's it! Thank you so much!