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

Calculate Overdue Balance and Total Debt with one slicer

Hi every one,

I searched on forums, but no solutions. Please help me !

 

I have a table as below named 'table1'; and when I select the slicer between two days, I want to take the result as below;

 
 

Screenshot 2020-12-27 at 23.06.15 PM.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Thank you

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@YasinTaha , Create a date table , Join that with Invoice date and Due date. In case due date join is the one inactive then use use relation and this type of formulas

 

Total Deb = sum(Table[Amount]) // Active join of invoice to be used

Overdue Invoices = calculate(sum(Table[Amount]),USERELATIONSHIP(Date[Date], Table[Due Date])) // Activate Due Date join

 

refer my Video for use relation:https://www.youtube.com/watch?v=e6Y-l_JtCq4

 

or this blog -https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in...

View solution in original post

6 REPLIES 6
YasinTaha
Frequent Visitor

It is awesome bro. This resolve my problem. Thank you so much

amitchandak
Super User
Super User

@YasinTaha , Create a date table , Join that with Invoice date and Due date. In case due date join is the one inactive then use use relation and this type of formulas

 

Total Deb = sum(Table[Amount]) // Active join of invoice to be used

Overdue Invoices = calculate(sum(Table[Amount]),USERELATIONSHIP(Date[Date], Table[Due Date])) // Activate Due Date join

 

refer my Video for use relation:https://www.youtube.com/watch?v=e6Y-l_JtCq4

 

or this blog -https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in...

wdx223_Daniel
Super User
Super User

@YasinTaha it is a trick about userelation ship. first to create a date table, then establish the relationship between date and Invoice date, which is active, and between date and overdue date, inactive.

wdx223_Daniel_0-1609116098751.pngwdx223_Daniel_1-1609116113592.png

 

Thank you so much, but I had no ability to solve my problem with your solution.

StefanoGrimaldi
Resident Rockstar
Resident Rockstar

this looks like a tricky one actually, since anything you do with the slicer will affect and filter the whole table, and you cant parse date formate value as user interface parameters, so you do can do this by creating a second table just to manage the slicer with the overdue amount: 

Table 2 = SUMMARIZE('Table','Table'[client],'Table'[Due date],"overdue amount",SUM('Table'[amount]))
relantionshipp type: 
StefanoGrimaldi_4-1609112671504.png

 

StefanoGrimaldi_3-1609112661514.png

 

there you go, basically this will filter the overdue new table and ensure the original one doesnt change upon altering the filter, will result in what you describe you looking for, 
 
if this was of help and solve your question please mark as solution for others to find it, and gives some kudos if you liked the solution. 




Did I answer your question? Mark my post as a solution! / Did it help? Give some Kudos!

Proud to be a Super User!




Thank you so much, but I had not such ability to solve my problem with your solution.

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.

Top Solution Authors