Forum Discussion
Filter visuals by 2 date columns
- 1 year ago
Hi aey,
Thank you for sharing your scenario in the community forum.I’ve reproduced your requirement in Power BI and validated the logic using sample data. The expected output is achieved successfully invoices are correctly filtered based on the selected reporting period such that:
- Only those invoices are shown where the 'Date of Invoice Sent' falls within the selected period.
- And the 'Date of Invoice Paid' is either blank or after the reporting period ends.
For your reference, I’ve attached a .pbix file demonstrating this logic end-to-end, including:
- Sample MASTER and Date Period tables.
- The DAX measure [IsValidInvoice] used for filtering.
- A working visual that dynamically updates based on the selected reporting period.
If this information is helpful, please “Accept as solution” and give a "kudos" to assist other community members in resolving similar issues more efficiently.
Thank you.
Hi aey
place the following measure in the filter pane of the visual, select 'Is no blank' and apply tye filter
Due Payments Filter =
COUNTROWS (
FILTER (
'MASTER',
'MASTER'[date of invoice paiddd/mm/yy]
> MAX ( 'Date Periods - Date of Invoice sent'[Date of Invoice sentdd/mm/yy] )
|| 'MASTER'[date of invoice paiddd/mm/yy] = BLANK ()
)
)