Forum Discussion
ganchevd
Helper I
9 years agoDefining overdues towards a dynamic filtered date
Dear All, I had stuck with this. Since I'm a Financial guy not an SQL expert. I have built a report for Account Receivables where I have the following columns: 1. Customer; 2. Document Number; ...
- 9 years ago
In order to get a dynamic date ,you can create a calendar table with the DAX below:
calendar = CALENDAR ( MIN ( 'sample'[due date] ), MAX ( 'sample'[due date] ) )
Then create two more measures
selected date = IF ( HASONEVALUE ( 'calendar'[date] ), MAX ( 'calendar'[date] ), TODAY () )
state = IF ( 'calendar'[selected date] > MAX ( 'sample'[due date] ), "overdue", "ok" )
- 9 years ago
Thank you! It seems quite easy. But now I lost the Customers names. When I add the Status column in the visual table, the customers names disapear and the status is either OK or Overdue to all of the entries.
Eric_Zhang
Microsoft Employee
9 years agoIn order to get a dynamic date ,you can create a calendar table with the DAX below:
calendar = CALENDAR ( MIN ( 'sample'[due date] ), MAX ( 'sample'[due date] ) )
Then create two more measures
selected date = IF ( HASONEVALUE ( 'calendar'[date] ), MAX ( 'calendar'[date] ), TODAY () )
state = IF ( 'calendar'[selected date] > MAX ( 'sample'[due date] ), "overdue", "ok" )
ganchevd
Helper I
9 years ago
Thank you! It seems quite easy. But now I lost the Customers names. When I add the Status column in the visual table, the customers names disapear and the status is either OK or Overdue to all of the entries.