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.
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.
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 |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |