Forum Discussion
SkorpionAAM
5 years agoHelper V
Max Calculation
New to DAX here. I am trying to calculate the latest record i create the new column which if place_digital_adress is same then Match if not then Not match _LOOK = var _val = LOOKUPVALUE('GasSt...
- 5 years ago
- 5 years ago
@SkorpionAAM So, this? PBIX attached.
Measure 6b = VAR __Table = ADDCOLUMNS( SUMMARIZE('Table (6)',[ID],"Date",MAX([Date])), "Status",MAXX(FILTER('Table (6)',[ID]=EARLIER([ID])&&[Date]=EARLIER([Date])),[STATUS_OF_STATION]) ) RETURN COUNTROWS(FILTER(__Table,[Status]="Open"))
Greg_Deckler
5 years agoCommunity Champion
SkorpionAAM - So like this?
Measure 6a =
VAR __ID = MAX([ID])
VAR __Latest = MAX([Date])
VAR __LatestStatus = IF(MAXX(FILTER(ALL('Table (6)'),[Date]=__Latest && [ID]=__ID),[STATUS_OF_STATION])="Open",1,0)
RETURN
__LatestStatus
Updated PBIX attached below sig.
SkorpionAAM
5 years agoHelper V
no ...
as i said if round 1 Station is close and in round 2 station is open then we count round 2 one
in your Dax its okay
For Example ID 1 in round 1 station was Open but In round 2 Survey Station is Closed
so Wht im doing is Count how many station is close and open till date now
so in round sttaion is open so now we count Close because in round 2 station is close
in your Dax giving me double count if chnage Conditon from open to close
- SkorpionAAM5 years agoHelper V
- Greg_Deckler5 years agoCommunity Champion
@SkorpionAAM So, this? PBIX attached.
Measure 6b = VAR __Table = ADDCOLUMNS( SUMMARIZE('Table (6)',[ID],"Date",MAX([Date])), "Status",MAXX(FILTER('Table (6)',[ID]=EARLIER([ID])&&[Date]=EARLIER([Date])),[STATUS_OF_STATION]) ) RETURN COUNTROWS(FILTER(__Table,[Status]="Open"))- SkorpionAAM5 years agoHelper V
let me check thn i back to u