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
ITManuel
Responsive Resident
Responsive Resident

Invoiced and paid amounts from same table with different dates

Hi all,

 

I've got a fact table in which I have Invoiced amounts with dates and paid amounts with dates. 

ProjectInvoicedInvoice datePaidPayment date

 

I would like to visualize in a column chart the invoiced amounts and paid amounts per months or dates. I've got a common calendar table connected to either invoice date or payment date from the fact table. 

Visualizing Invoiced and Paid in the same chart with either Invoice date or Payment date connected to the common date table puts Invoiced and Paid to the same months/date as there is only a connection to either of the dates. (Invoiced and paid dates are significantly different)

 

I worked around this issue by duplicating the fact table connecting the common calendar to Invoiced date in the original table and to Payment date in the duplicated table. Now it works, but I'm asking myself if there isn't a more elegant ways around this or if there is something which I'm doing fundamentaly wrong?

 

Thanks in advance 

 

Best regards

 

1 ACCEPTED SOLUTION
v-yingjl
Community Support
Community Support

Hi @ITManuel ,

Suppose you are using the relationship between the calendar[date] and Table[Paid] column, you can keep the inactive relationship between calendar[date] and Table[Invoiced], just like this:

relationship.png

Then you can create use Userelationship() to create a measure like this instead of duplicating the fact table, put it with [Paid] column in the column chart, you should get the expected result:

_Invoiced = 
CALCULATE(
    SUM('Table'[Invoiced]),
    USERELATIONSHIP('Table'[Invoice date],'Calendar'[Date])
)

re.png

Attached a sample file in the below, hopes to help you.

 

Best Regards,
Yingjie Li

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yingjl
Community Support
Community Support

Hi @ITManuel ,

Suppose you are using the relationship between the calendar[date] and Table[Paid] column, you can keep the inactive relationship between calendar[date] and Table[Invoiced], just like this:

relationship.png

Then you can create use Userelationship() to create a measure like this instead of duplicating the fact table, put it with [Paid] column in the column chart, you should get the expected result:

_Invoiced = 
CALCULATE(
    SUM('Table'[Invoiced]),
    USERELATIONSHIP('Table'[Invoice date],'Calendar'[Date])
)

re.png

Attached a sample file in the below, hopes to help you.

 

Best Regards,
Yingjie Li

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

ITManuel
Responsive Resident
Responsive Resident

Hi 

 

 

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.