Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Show only last date data with condition

Hi, please, help, i`m stacked..

I`m trying to create table with all measures for the last day(14/09/16) with condition. I have the table like thew attached. 4 Dimensions  -Measure, isAnomally, Date and scor3e. I need to create a table only with the measures and score that on max(date) IsAnomally<>0.

I tried FirstSortedValue(Date,-Date) or FirstSortedValue(Measure,-Date) doesn`t work

if(date=max(date),Measure) doesn`t work

Will be glad to hear your ideas, thanks

6 Replies
sunny_talwar

May be like this

Dimension

Measure

Expressions

1) FirstSortedValue({<IsAnomally = {'<>0'}>} Score, -Date)

2) Date(Max({<IsAnomally = {'<>0'}>} Date))

Not applicable
Author

Thanks, but unfortunately, it doesn`t work. The result is the last day for each measure when anomaly was <>0. And what i need is the anomaly status of each measure for the 17/09/2016. Smthg like if this measure has ISanomaly<>0Capture.PNG for the last day in the model, then show the score, if it wasn`t anomaly then hide it.  I saw that i can use TOTAL, but it seems that with dates it doesn`t work. See the results of your purpose in the attached.

vinieme12
Champion III
Champion III

Can you post a sample for expected output, it'll be easier to understand.

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Not applicable
Author

Hi, this is the output that i need

Give me all measures and it`s score with IsAnomally<>0 on the max date (18/09/2016 this day)

Capture.PNG

tresesco
MVP
MVP

Try like:

1) FirstSortedValue(Total {<IsAnomally = {'<>0'}>} Score, -Date)

2) Date(Max(Total {<IsAnomally = {'<>0'}>} Date))

Not applicable
Author

Hi, First One doesn`t work, second one returns correct date, but all measures, not only measures with IsAnomaly<>0.....but, thanks