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
satubuku83
Frequent Visitor

Retrieve latest value as of point of time

Hi all,

 

Assuming I have dim_date (containng date_id, date, day, month, year) and dim_claim(claim_id, claim_no) and fact_claim(date_id, claim_id, reserve_amt).

 

Claim_IDDate_IDReserve_AMT
330074719.25
130384289.72
2303813455.6
2306817654.2

 

How can i write the dax to get only point in time value, for example,

If i build a line chart/time series:

March(date_id 3007) will show 4719.25

April (date_id 3038) will show 4719.25 + 4289.72 + 13455.6

May (date_id 3068) will show 4719.25 + 4289.72 + 17654.2

 

Regards

 

1 ACCEPTED SOLUTION
v-frfei-msft
Community Support
Community Support

Hi @satubuku83,

 

I made one sample for your reference. Here we can create a measure like this.

 

Measure =
CALCULATE (
    SUM ( Table1[Reserve_AMT] ),
    FILTER (
        ALL ( Table1 ),
        Table1[Date_ID] <= SELECTEDVALUE ( Table1[Date_ID] )
            && Table1[Date_ID]
                = CALCULATE (
                    MAX ( Table1[Date_ID] ),
                    FILTER (
                        ALLEXCEPT ( Table1, Table1[Claim_ID] ),
                        Table1[Date_ID] <= SELECTEDVALUE ( Table1[Date_ID] )
                    )
                )
    )
)

Capture.PNG

For more details, please check the pbix as attached.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

 

Share data that can be copied in an Excel file.  Also, how does one interpret 3038? 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-frfei-msft
Community Support
Community Support

Hi @satubuku83,

 

I made one sample for your reference. Here we can create a measure like this.

 

Measure =
CALCULATE (
    SUM ( Table1[Reserve_AMT] ),
    FILTER (
        ALL ( Table1 ),
        Table1[Date_ID] <= SELECTEDVALUE ( Table1[Date_ID] )
            && Table1[Date_ID]
                = CALCULATE (
                    MAX ( Table1[Date_ID] ),
                    FILTER (
                        ALLEXCEPT ( Table1, Table1[Claim_ID] ),
                        Table1[Date_ID] <= SELECTEDVALUE ( Table1[Date_ID] )
                    )
                )
    )
)

Capture.PNG

For more details, please check the pbix as attached.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

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.