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.
Hi,
We have a vendor invocices management system containing all incomming invoices for the company. each row of this system represents one document, each column represents one of its characteristics with the most important ones as follow:
Document ID | VIM process status | Gross inv amount | Document date | due date | enter on | posted on | paid on | ||
54364 |
Posted | 200 | 2020-11-09 | 2020-12-09 | 2020-11-10 | 2020-12-10 | 2020-12-22 | ||
54365 | Cancelled | 100 | 2020-08-10 | 2020-10-10 | 2020-08-12 | ||||
5425961 | posted | 400 | 2020-12-01 | 2021-01-01 | 2020-12-03 | 2020-12-15 |
VIM Process Status - Posted/osolete/cancelled/blocked/indexed etc - generally for further KPI's I am interested in only "Posted"status
Document date - date on the invoice
Due date - date when the invoice should be paid
Enter on - date when the invoice was entered into VIM
Posted on - date when the accounting posting was done (between entering into the system and posting, the invoice is processed and checked for Purchase Order existence, vendor validity etc, many other checks)
Paid on - the date invoice is paid
I would like to create a new date table containing all the dates from 1-1-2020 until today and for every date (Every D) I would like to show graphically (or in the table the following KPI:
KPI name | KPI reference to VIM | Measure |
not processed invoices for each date (D) | invoices where: "Enter on" <= "D" < "Posted on" | number of such invoices and their total amount |
not processed invoices >5 days (or 10, or 15 days) | invoices where: "Enter on" <= "D" < "Posted on" - 5 (or minus 10 or minus 15 days) | number of such invoices and their total amount |
overdue payments >30 days | "Due Date" <= "D" <"Payment Date" - 30 | number of such invoices and their total amount |
such KPI would be very helpful in following up the processing time (too long now) and payments.
I was searching for any similarities in different posts but did not find anything that would solve the above.
thank you for any help
BR
Draszor
Solved! Go to Solution.
@Draszor Using the CALENDAR function for date table is a bit more work (you have to add all the other columns for month, week, etc) and less efficient for the report, but it will work.
So you have two tables now: Date and Fact. The Fact table has [EnterDate], [PostDate]
So create a new measure:
Not Processed Invoices =
VAR _date = MAX(Date[Date])
RETURN
CALCULATE(COUNTROWS(FILTER(Fact, Fact[EnterDate] <= _date && Fact[EnterDate] < Fact[PostDate]), ALL(Date))
Then you will need to put this measure in visual with Date[Date] in the visual or as a slicer on the page.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
@Draszor Using the CALENDAR function for date table is a bit more work (you have to add all the other columns for month, week, etc) and less efficient for the report, but it will work.
So you have two tables now: Date and Fact. The Fact table has [EnterDate], [PostDate]
So create a new measure:
Not Processed Invoices =
VAR _date = MAX(Date[Date])
RETURN
CALCULATE(COUNTROWS(FILTER(Fact, Fact[EnterDate] <= _date && Fact[EnterDate] < Fact[PostDate]), ALL(Date))
Then you will need to put this measure in visual with Date[Date] in the visual or as a slicer on the page.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
@Draszor Here is a data table you can use: https://excelwithallison.blogspot.com/2020/04/dimdate-what-why-and-how.html
And you can either use the ALL(Date) function or unrelated date table and then add your filter conditions similar to this approximate DAX Lookup: https://excelwithallison.blogspot.com/2020/06/dax-approximate-lookup.html
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
hi,
for a new date table I was going to use:
Date = CALENDAR(DATE(2020,1,1),TODAY())
then, what I struggle with:
any hint? maybe it should not be done in DAX but in the query with C language? as said, not enough experience to have clarity, but I am trying to cath up as you see 😉
thx
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
100 | |
78 | |
76 | |
52 |
User | Count |
---|---|
144 | |
109 | |
108 | |
88 | |
61 |