Forum Discussion
Sander_NL
5 years agoHelper I
How to extract the highest value
Good morning!, I've have the following columns in the same table ID Status Y1000.A04 OK Y1000.A05 NOK Y1000.A06 OK Y2000.A01 OK Y2000.A02 OK ...
- 5 years ago
Great start Sander_NL
There's a few options, one you can try is a new column:
LatestVersion = IF( COUNTROWS(FILTER('Table', 'Table'[Version] >= EARLIER('Table'[Version]) && 'Table'[Segment] = EARLIER('Table'[Segment])))=1, 1)
AlB
5 years agoCommunity Champion
Hi Sander_NL
1. Place Table1[ID] in a table visual
2. Create this measure and place it in the visual
StatusM =
VAR selectedID2_ =
SELECTEDVALUE ( Table1[ID2] )
VAR latestVersion_ =
CALCULATE (
MAX ( Table1[Version] ),
ALL ( Table1[ID] ),
Table1[ID2] = selectedID2_
)
RETURN
IF (
SELECTEDVALUE ( Table1[Version] ) = latestVersion_,
CALCULATE (
DISTINCT ( Table1[Status] ),
ALL ( Table1[ID] ),
Table1[Version] = latestVersion_
)
)
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers