The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi Experts,
Hope you are good. Currently, I'm calculating Overdue amount by passing user selected date for analysis for 1-30 days Overdue, 31-60 days overdue, 91-120 days overdue, 121-360 days overdue and finally >360 days overdue. I calcuate these slabs for Open Invoice/Items and also for closed for historical data. And for Total Overdue I add up all these split/slabs.
Now my requirement is to calculate the Total Overdue split days wise for selected month. Below is my measure for 1-30 days calculation for Item Status = 'O'.
@ashrat001 . In such case you should use date table. In this case date table can be independent (not joined to table) or use crossfilter to remove
1-30 Days =
VAR LastDay= MAXX(allselected('Date'), 'Date'[Date]) //should return last date in selected period
RETURN
SUMX(
FILTER(
'Table',
'Table'[Net due date.Net due date Level 01]<LastDay && 'Table'[Net due date.Net due date Level 01]>=LastDay-30 && 'Table'[Item Status.Item Status Level 01] = "O"
),
'Table'[Debit amt in LC]
)
With cross filter if joined
1-30 Days =
VAR LastDay= MAXX(allselected('Date'), 'Date'[Date]) //should return last date in selected period
RETURN
calculate(
SUMX(
FILTER(
'Table',
'Table'[Net due date.Net due date Level 01]<LastDay && 'Table'[Net due date.Net due date Level 01]>=LastDay-30 && 'Table'[Item Status.Item Status Level 01] = "O"
),
'Table'[Debit amt in LC]
), crossfilter('Table'[Net due date.Net due date Level 01,'Date'[Date]) )
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.
User | Count |
---|---|
15 | |
8 | |
6 | |
6 | |
5 |
User | Count |
---|---|
23 | |
13 | |
13 | |
8 | |
8 |