Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi Guys,
Below a simplified representation of the data i have. I have a long list of documents which have an 'opening date' and a 'closing' date. I want to have a chart showing me how many documents were open and closed in a specific month. I can't gat power BI to do this (tough it seems pretty straight forward).
I created a data table to be able to show the last 12 monts and tried to relate boths dates (opened / closed) to it.
The issue i'm having is that a document which is closed in feb for ex. but started in jan is still counted as 'closed' in jan.
Solved! Go to Solution.
Here it is,
Create 2 Measures
Closed within Same Month = CALCULATE(COUNT(Data[DOC NR]),FILTER(Data,Data[DATE CLOSED]<=EOMONTH(Data[DATE OPEN],0)))
Open within Same Month = CALCULATE(COUNT(Data[DOC NR]),FILTER(Data,Data[DATE CLOSED]>EOMONTH(Data[DATE OPENED],0)))
It's probably a relationship issue - let's assume that the opened date is the one that has the active relationship to your date table, when you're wanting to count the number of closed dates, in your measure to do so you need to add in userelationship to tell Power BI to look at the relationship between your date table and your closed date column
I was thinking the same way. I am hower not that familliar yet with measures which count rows. Is there any working example available somewhere?
Here it is,
Create 2 Measures
Closed within Same Month = CALCULATE(COUNT(Data[DOC NR]),FILTER(Data,Data[DATE CLOSED]<=EOMONTH(Data[DATE OPEN],0)))
Open within Same Month = CALCULATE(COUNT(Data[DOC NR]),FILTER(Data,Data[DATE CLOSED]>EOMONTH(Data[DATE OPENED],0)))
User | Count |
---|---|
140 | |
113 | |
104 | |
76 | |
63 |
User | Count |
---|---|
135 | |
126 | |
110 | |
70 | |
61 |