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
timknox
Helper II
Helper II

Help with a 'complicated' measure

hi,

 

I am trying to write a measure, but i am stuck!!

 

Basically i have a data set - below is an example:

ItemValueDateCost WithheldPaid
1.1        234.0001/09/20180%        234.00
1.1        345.0001/10/20180%        345.00
1.1        456.0001/11/201820%        364.80
1.1        234.0001/12/201830%        163.80
1.1        345.0001/01/20190%        345.00
1.2        269.1001/09/20180%        269.10
1.2        396.7501/10/20180%        396.75
1.2        524.4001/11/201840%        314.64
1.2        269.1001/12/20180%        269.10
1.2        396.7501/01/20190%        396.75
1.3        309.4701/09/20180%        309.47
1.3        456.2601/10/20180%        456.26
1.3        603.0601/11/201820%        482.45
1.3        309.4701/12/20180%        309.47
1.3        456.2601/01/20190%        456.26

 

I have a user relationship between this table (DATA) and another table (Withhold) - example:

 

Date1.11.21.3
01/01/180%0%0%
01/02/180%0%0%
01/03/180%0%0%
01/04/180%0%0%
01/05/180%0%0%
01/06/180%0%0%
01/07/180%0%0%
01/08/180%0%0%
01/09/180%0%0%
01/10/180%0%0%
01/11/1820%40%20%
01/12/1830%0%0%
01/01/190%0%0%
01/02/190%0%0%
01/03/190%0%0%
01/04/190%0%0%
01/05/190%0%0%
01/06/190%0%0%
01/07/190%0%0%
01/08/190%0%0%
01/09/190%0%0%
01/10/190%0%0%
01/11/190%0%0%
01/12/190%0%0%
01/01/200%0%0%
01/02/200%0%0%

 

Basically I have a measure that extracts the percentage withheld, and puts the value in the corresponding line in the DATA file.  And then i have a measure that works out how much is paid (less the % withheld).

 

NOW THE PROBLEM!

 

I have another data file (Paid Date):

 

ItemDate WithheldDate Paid% Paid
1.101/11/201801/12/201810%
1.101/11/201801/01/201910%
1.101/12/201801/01/201920%
1.201/11/201801/01/201910%
1.301/12/201801/01/201920%

 

So for a particular item, elements of the % withheld are then 'released' on subsequent dates.  Example is with Item 1.1 - you will see that orriginally on the 1/11/18 20% of the cost was withheld; 10% was then released on teh 1/12/18; and 10% was released on 1/1/19.

 

I am looking for a measure that would - for example give me the total paid on say the 1/1/19 for item 1.1 - this would be made up of the 345.00 that was paid on 1/1/19, PLUS the 10% of the value that was retained on the 1/11/18 and paid on the 1/1/19 (i.e. 10% of 456.00 = 45.60), PLUS the 20% of the value that was retained on the 1/12/18 and paid on the 1/1/19 (i.e. 20% of 234.00 = 46.80)

 

Does that make sense????

 

Welcome and views please.

 

Thanks

 

 

 

 

11 REPLIES 11

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.