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
Rada137
Regular Visitor

Repeated parameter

I need a measure to help me with the following: in a database I have all the information of dispatch of goods of the company... in the SS 1 you can see how I organized in Power Query part of the table where it shows the number of cargo, the total weight loaded and the plate of each barge used. However, the plate can be repeated over time and in this visual I am doing the information of an old barge is added with the info of a new one, causing error in the report. SS 2 shows an example of how the information is presented in DAX, the plate is repeated but the ship dates are different. I need a measure to sum up the weights of a plate, in the last date period that it was shipped.

 

SS 1

Rada137_1-1675712104796.png

 

SS 2

Rada137_0-1675711067546.png

 

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @Rada137 

 

Not sure if I understand your purpose correctly. From your "SS 2", the plate AEP7050 has two shipDate 2022/3/31 and 2023/1/23. As its latest ship date is 2023/1/23, do you want to sum up the "totalWeightLBS" of AEP750 on 2023/1/23? If so, you can try the following measure:

Latest Total = 
var _latestDate = MAX('Table'[shipDate])
return
CALCULATE(SUM('Table'[totalWeightLBS]),'Table'[shipDate]=_latestDate)

vjingzhang_0-1675754352673.png

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

1 REPLY 1
v-jingzhang
Community Support
Community Support

Hi @Rada137 

 

Not sure if I understand your purpose correctly. From your "SS 2", the plate AEP7050 has two shipDate 2022/3/31 and 2023/1/23. As its latest ship date is 2023/1/23, do you want to sum up the "totalWeightLBS" of AEP750 on 2023/1/23? If so, you can try the following measure:

Latest Total = 
var _latestDate = MAX('Table'[shipDate])
return
CALCULATE(SUM('Table'[totalWeightLBS]),'Table'[shipDate]=_latestDate)

vjingzhang_0-1675754352673.png

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

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.