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.
I have a table of bugs that has two main fields: environment and created date. I need to get the total number of bugs by environment for the past 6 months for each month. I tried many solutions I found online but nothing seemed to work.
I currently have multiple measures that calculate the number of bugs by environment per month, this is what those look like:
Solved! Go to Solution.
Hi @Anonymous,
You can try to use the following measure formula if it meets your requirement:
Production Bugs =
VAR currDate =
MAX ( Bugs[createdDate] )
RETURN
COUNTROWS (
FILTER (
ALLSELECTED ( Bugs ),
Bugs[env] = "Production"
&& Bugs[createdDate]
>= DATE ( YEAR ( currDate ), MONTH ( currDate ) - 6, DAY ( currDate ) )
&& Bugs[createdDate] <= currDate
)
) + 0
Regards,
Xiaoxin Sheng
Hi,
Share some data and show the expected result.
Hi @Anonymous,
You can try to use the following measure formula if it meets your requirement:
Production Bugs =
VAR currDate =
MAX ( Bugs[createdDate] )
RETURN
COUNTROWS (
FILTER (
ALLSELECTED ( Bugs ),
Bugs[env] = "Production"
&& Bugs[createdDate]
>= DATE ( YEAR ( currDate ), MONTH ( currDate ) - 6, DAY ( currDate ) )
&& Bugs[createdDate] <= currDate
)
) + 0
Regards,
Xiaoxin Sheng
@Anonymous , you can use relative date slicer or this approach
https://www.youtube.com/watch?v=duMSovyosXE
relative date slicer
https://docs.microsoft.com/en-us/power-bi/visuals/desktop-slicer-filter-date-range
I need the actual data as I need to use it for other calculations. So it would need to be a measure I think.
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 | |
94 | |
83 | |
66 | |
59 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |