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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
stiven965
Regular Visitor

How to consume points prioritizing those closest to expiring in Power BI?

I have one table with these columns:

 

ID

Name

Date

Points

ExpirationDate

Each record represents the points earned by a person on a date, and has an assigned expiration date.

 

I also have a second table with the amount of points to redeem for each user.

 

For example, Juan has 50 total points earned on different dates. Juan wants to redeem 50 points for a prize that costs 27 points.

 

I need the consumption of the 27 required points to be done by prioritizing Juan's points that are closest to expiring.

 

How can I create this logic in DAX? I thought about previously sorting the table by ExpirationDate and then making a cumulative sum with filters.

 

But I'm not sure how to implement the necessary filters to respect the logic of prioritizing by expiration date.

 

I appreciate if someone can help me by providing an example or pseudocode of how to create this measure in DAX.

 

Thanks,

1 REPLY 1
lbendlin
Super User
Super User

Power BI is a reporting tool, not a resource management tool.

 

Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.
If you are unsure how to do that please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.

If you want to get answers faster please refer to https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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

Top Kudoed Authors