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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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.



Proud to be a Super User!

daxformatter.com makes life EASIER!

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 ?



Proud to be a Super User!

daxformatter.com makes life EASIER!
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



Proud to be a Super User!

daxformatter.com makes life EASIER!

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.