Forum Discussion
EmilijaN
4 years agoHelper I
How to put additional rule in the code below
Hello guys,
I need help with this code:
FuelAmount_Monthly =
Var
Pomosna1=MINX(FILTER(Trip_Activity,Trip_Activity[Month&Year]=EARLIER(Trip_Activity[Month&Year]) && Trip_Activity[ID]=EARLIER(Trip_Activity[ID])),Trip_Activity[Index])
var
Pomosna2=CALCULATE (
SELECTEDVALUE ( FuelAmount_Monthly[sum]),
FILTER (
FuelAmount_Monthly,(FuelAmount_Monthly[Month&Year]=Trip_Activity[Month&Year] && FuelAmount_Monthly[ID]=Trip_Activity[ID]
)))
return
if([Index]=Pomosna1, Pomosna2,BLANK())
What exactely I need is: I need the rows that are not maching the code. Or, if there is rows that are not meching by ID, than try with TruckId. But I do not know how to put rule with TruckId in this code.
Any suggestions?
Thank you!
1 Reply
- lbendlinSuper User
Please provide sanitized sample data that fully covers your issue. Paste the data into a table in your post or use one of the file services. Please show the expected outcome.