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.
Hi,
I have data in a table like below:
Unique ID | Status 1 Start Date | Status 1 End Date | Status 2 End Date | Status 3 End Date | Status 1 Time | Status 2 Time | Status 3 Time |
AA | 4/29/2020 | 4/30/2020 | 5/1/2020 | 5/3/2020 | 1.00 | 1.00 | 2.00 |
AB | 4/23/2020 | 4/25/2020 | 4/28/2020 | 4/30/2020 | 2.00 | 3.00 | 2.00 |
AC | 4/19/2020 | 4/20/2020 | 4/22/2020 | 4/24/2020 | 1.00 | 2.00 | 2.00 |
AD | 4/19/2020 | 4/29/2020 | 5/1/2020 | 5/3/2020 | 10.00 | 2.00 | 2.00 |
AE | 4/23/2020 | 4/25/2020 | 4/28/2020 | 4/29/2020 | 2.00 | 3.00 | 1.00 |
AF | 4/19/2020 | 4/20/2020 | 4/21/2020 | 4/24/2020 | 1.00 | 1.00 | 3.00 |
I want to be able to summarize how many Unique IDs were completed in a specific time period for all 3 statuses, and also find on average how long it took in that time period.
So I am trying to create a date slicer that can calculate it for all statuses at the same time.
So for example, if I had a date slicer set to 4/28/2020 to 5/1/2020:
Count_1 = 2
Count_2 = 4
Count_3 = 2
Avg_Time_1 = 5.5
Avg_Time_2 = 2.25
Avg_Time_3 = 1.5
Is something like this possible?
Thanks,
Andrew
Solved! Go to Solution.
Hi @Andrew17 ,
Create an unrelated calendar table as slicer then create measure like this:
Count_1 = CALCULATE(COUNT('Table'[Unique ID]),FILTER('Table','Table'[Status 1 End Date] in VALUES('Table 2'[Date])&&'Table'[Status 1 Start Date]<=MAX('Table 2'[Date])))
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Andrew17 ,
Create an unrelated calendar table as slicer then create measure like this:
Count_1 = CALCULATE(COUNT('Table'[Unique ID]),FILTER('Table','Table'[Status 1 End Date] in VALUES('Table 2'[Date])&&'Table'[Status 1 Start Date]<=MAX('Table 2'[Date])))
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Andrew17 , One way is to unpivot this table https://radacad.com/pivot-and-unpivot-with-power-bi
Second way is to join all dates to a common date table and use userelation as per need. Only one can be active at a time.
Refer how to use: https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/
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 |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |