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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
GINMED
Helper III
Helper III

FIRST & LAST payements

Hi, I have created project for loan depreciation, but there is some other expences to calculate, for example, casco insurance.

But I can't to get right measure to calculate - how to switch first and last payment for each loan item?

 

There is my data.

Thank you in advance for support.

 

GINMED_0-1661844180645.png

GINMED_1-1661844239037.png

 

2 REPLIES 2
v-easonf-msft
Community Support
Community Support

Hi, @GINMED 

Not fully sure what is your question, can you tell us a bit more about what exactly you were doing?

Best Regards,
Community Support Team _ Eason

@v-easonf-msft 

I have created project for payments per item.

And then I should calculate some expences, where I have such measure

 

VAR firstP = MINX(ALLSELECTED('Līgumi_Project'), ('Līgumi_Project'[Sequence]))
VAR lastP = MAXX(ALLSELECTED('Līgumi_Project'), ('Līgumi_Project'[Sequence]))
VAR CurrentSeq = SELECTEDVALUE('Līgumi_Project'[Sequence])
VAR CurrentP = SELECTEDVALUE('Līgumi_Project'[KASKO])

VAR result =
SWITCH(
CurrentSeq,
firstP,[KASKO_FIRST],
lastP,[KASKO_LAST],
CurrentP
)
RETURN result
 
but this one does not work for each item, it shows incorect LAST PAYMENT
GINMED_0-1662108164355.png

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.