Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have a log that has a created date and a closed date. I have 2 bar charts, log closed by month and log created by month.
I want to limit each of these to the last 12 months for the relevant date, closed for the closed chart and created for the created chart.
When I put a filter on it filters both charts by the date selected, either created or closed. That creates a problem for the closed log as it will filter out log items that were created more than 12 months ago even if they were not closed until the last 12 months.
Other than duplicating the query, what options do I have?
Solved! Go to Solution.
Hi @binki , I suggest you these simple steps
1) Have/create a Calendar/Date table in case you don't have it
2) Create an active relationship between Date and Creaded Date
3) Create an inactive relationship between Date and Closed Date
4) Create 2 measures:
ValueForCreatedDate = CALCULATE([SumOrValueMeasure], USERELATIONSHIP('Calendar'[Date], 'ValuesTable'[CreatedDate]))
ValueForClosedDate = CALCULATE([SumOrValueMeasure], USERELATIONSHIP('Calendar'[Date], 'ValuesTable'[ClosedDate]))
5) Use the date from the Calendar table as the slicer and your measures as your values 🙂
Proud to be a Super User!
Hi @binki , I suggest you these simple steps
1) Have/create a Calendar/Date table in case you don't have it
2) Create an active relationship between Date and Creaded Date
3) Create an inactive relationship between Date and Closed Date
4) Create 2 measures:
ValueForCreatedDate = CALCULATE([SumOrValueMeasure], USERELATIONSHIP('Calendar'[Date], 'ValuesTable'[CreatedDate]))
ValueForClosedDate = CALCULATE([SumOrValueMeasure], USERELATIONSHIP('Calendar'[Date], 'ValuesTable'[ClosedDate]))
5) Use the date from the Calendar table as the slicer and your measures as your values 🙂
Proud to be a Super User!
Create a second, inactive relationship from the calendar date to the close date. Create a second measure with USERELATIONSHIP. Then you can show both in the same date range.
User | Count |
---|---|
77 | |
75 | |
46 | |
31 | |
28 |
User | Count |
---|---|
99 | |
93 | |
50 | |
49 | |
46 |