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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.