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
majid_75
Helper I
Helper I

I need help please on DAX

I have a table that’s like this

majid_75_0-1705690296679.png

And I want to get the max on the previous periods but that when I have a limit

majid_75_2-1705690397785.png

 


Thanks!

5 REPLIES 5
gmsamborn
Super User
Super User

Hi @majid_75 

 

Another question...

 

Regarding your [Exposition] column, It appears that you want the [exposition] value for earliest date after the previous “limite” date?

 

That rule would work for 3M and 6M but the value for 1Y would be 23,291.  Your 1Y result is from the previous row (26,456), not like the rule I outlined above. Can you explain why?

 

I hope this makes sense.

Hi,

Yes exactly, i want the [exposition] value for earliest date after the previous “limite” date.

 

For 1Y, my max it's 26 456 on my previous period (with a limit)

majid_75_0-1705912187186.png

 

 

Hi @majid_75 

 

You said: "Yes exactly, i want the [exposition] value for earliest date after the previous “limite” date."

 

With the data supplied, shouldn't the result for 1Y be 23290?  It is the earliest record after the previous "limite" record.

 

Your result of 26456 is the latest record after the previous "limite" record, not the earliest.

 

can you confirm this?

 

 

Also, can you provide data that a) doesn't have duplicate values for [Maturity] and b) covers 2Y and 5Y ?

gmsamborn
Super User
Super User

Hi @majid_75 

 

I have a few questions regarding your data and expected results.

 

1) Values in the 1st table seem to be 1000 times bigger than those in the 2nd table.

 

2) Can you explain your results in [exposition] column? (2nd table)

- How did you arrive at these numbers?

 

3) Do you only want result for 3M, 6M, 1Y or does that list change?
- If it changes, please explain.

 

4) Why do the following have 2 rows?  0D, 1D, 2D, 3D

Hi,

 

1) It's just the unit, the first in € but the second is K€

2) the [exposition] value for earliest date after the previous “limite” date

3) It's a display static, i want only 3M, 6M, 1Y, 2Y and 5Y.

4) sorry it's just different category

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.