The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi
I'm trying to count resolved incidents by month. The data contains date with hour. Note that in the same day, you can have in the same hour multiple entries (2023-12-04 15:15:50 & 2023-12-04 15:19:16). So multiple incidents resolved in the same hour.
Excel table example:
I'm able to count with this measure below but it doesn't count twice the resolved entries if it's in the same hour. So i'm missing some entries in my count.
Example on december 4th, it only count 1 and it should be 2.
Here is the measure that i created but that give me false count :
Solved! Go to Solution.
Hi
Here what i did to fix my issue.
I change the data column from Date/Time to Date in the data value (Edit Query) since I don't care about the time and just want the date count.
So, here is the measure that I created and is functionnal for my needs:
Hi
Here what i did to fix my issue.
I change the data column from Date/Time to Date in the data value (Edit Query) since I don't care about the time and just want the date count.
So, here is the measure that I created and is functionnal for my needs:
Hi, @patpois
May I ask if this is the expected output you are looking for? Based on your description, I have created many measures to achieve the effect you are looking for. Following picture shows the effect of the display.
Measures:
Month =
MONTH ( 'BBD Incidents'[Resolved] )
Incident Resolved Monthly =
VAR _resolved =
CALCULATE (
COUNTROWS ( 'BBD Incidents' ),
FILTER (
'BBD Incidents',
[Resolved] >= MIN ( 'BBD Incidents'[Resolved] )
&& [Resolved] <= MAX ( 'BBD Incidents'[Resolved] )
&& ISNUMBER ( [Resolved] )
)
)
RETURN
_resolved
If this does not work, could you please share some sample data without sensitive information and expected output.
How to provide sample data in the Power BI Forum - Microsoft Fabric Community
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi
I have try the proposed measure but it get an error :
Hi
Adding a more complete table example below:
The expected result :
And a graph output :
So it should not count any blank entries, only entries with resolved date and time.
And count all entries where there is a date with time.
Hi,
Can you share the expected output snapshot to get an clear understanding.
If possible please do the share the sample pbix file?
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
21 | |
21 | |
18 | |
16 | |
13 |
User | Count |
---|---|
41 | |
38 | |
23 | |
21 | |
19 |