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.
Hello,
I have a table with 2 dates, which I display in my page:
Below, I have 2 bar charts showing how many elements have been opened and closed in a month :
Opened (x-axis: opening date) :
Closed (x-axis: closing date) :
Clicking on a month in the "Closed" chart will filter my table to only display elements closed in this month.
What I want to do now and don't know how to, is filter my whole page with a date slicer (or a month dropdown list) to display elements that have been opened OR closed in this period.
If I filter on August, it should give me:
Is there a way to do that? Maybe with unactive relationships but I haven't found a solution so far...
Hi @Anonymous,
Could you please offer some sample data to have a test and post your desired result if possible?
Regards,
Daniel He
My data and page (all my data is in the table displayed):
Relationship:
Date = CALENDAR(DATE(2000;1;1); DATE(2050;12;31)) Stores closed = CALCULATE( COUNT(Table1[closing date]); USERELATIONSHIP(Table1[closing date]; 'Date'[Date]) ) Stores opened = CALCULATE( COUNT(Table1[opening date]); USERELATIONSHIP(Table1[opening date]; 'Date'[Date]) )
What I want when I click on August or when I filter my page on August with a slicer: opened OR closed in August:
try this
1. create a table with unique dates
date = CALENDAR(DATE(2018;01;01);DATE(2018;12;31))
2. create non-active relationships between date(1)->(*)opening date and date(1)->(*)closing date
3. Create two measures that calculate count opening and closing dates
open.cnt = CALCULATE(COUNT('table'[opening date]);USERELATIONSHIP('table'[opening date];'date'[Date]))
close.cnt = CALCULATE(COUNT('table'[closing date]);USERELATIONSHIP('table'[closing date];'date'[Date]))
4. get plot where axis=dates
mb someone knows better way to get it
I tried this, but there are 2 problems:
- my date slicer with 'date'[date] doesn't filter my table ;
- when I click on a chart, it doesn't filter my table either.