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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
gvanbuhler
Frequent Visitor

Calculate Payment received where Billing Year is same as Payment Year

I am trying to create a column or measure where I can provide the amount paid where the Billing Year = the Payment Year.  I need it to be dynamic so that if we are looking at year 2019 we only see payments for billings done in 2019 or any other year.  I've already created a YTD payments but in January the billing was from December.  Any thoughts?

 

I have tables.columns:
Date Dim Billing.Billing Year

Date Dim Payment.Payment Year

Sales Transactions Header.Billing Date

Sales Transactions Allocation.Payment Date

 

4 REPLIES 4
lbendlin
Super User
Super User

This is similar to the "Count of opened and closed tickets per time period" pattern.  Usually this involves a date (calendar) table, an active relationship with one date ( for example billing date) and an inactive relationship with the other (payment date).  Then in you DAX you can use USERELATIONSHIP() to switch as needed.

I will research more on the  "Count of opened and closed tickets per time period" pattern.  I have two different date dim tables for the two dates, would it only work with using an inactive relationship and USERELATIONSHIP()?

lbendlin
Super User
Super User

Please provide sample data in usable format (not as a picture) and show the expected outcome.

I'm having some issues putting the data in a usable format that is not getting an HTML Error

 

Billing Year     Payment Rec'd Year      Amount

   2019                     2019                       $75

   2019                     2020                       $100

   2020                     2020                       $200

   2020                     2021                       $250

   2021                     2021                       $300

 

So: 

2019 billings = $175

2019 payment rec'd = $75

2020 billing = $450

2020 payment rec'd = $300

2020 payment rec'd for same year billing = $200 ****this is the calculation I'm looking for.  I already have the YTD and correspodning measures complete.  just need to figure out how to add the filter (BillingYear = PaymentYear)

 

Transaction Amount ABS YTD Same Billing Year =
CALCULATE( [Sum of Transaction Amount ABS],
FILTER(
ALL('Date Dim (Transaction)'),
'Date Dim (Transaction)'[Transaction Year] = 'Date Dim (Billing)'[Current Billing Year]
))

 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Fabric Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.