Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi All,
I have a single table with 2 date fields:
Report Date Created on Count
01/03/2019 | 10/03/2019 | Y |
01/03/2019 | 06/05/2015 | N |
01/04/2019 | 04/08/2016 | N |
01/04/2019 | 20/04/2019 | Y |
01/04/2019 | 05/04/2019 | Y |
The logic I need is: Count IF "Created On" Month and Year = "Report date" Month and Year.
What is the best method of creating this?
Thank you in advasnce for any help.
Moby
Solved! Go to Solution.
Hi @Anonymous
You may create a column like below and then create a measure to get the count.
Column = IF ( MONTH ( 'Table'[Report Date] ) = MONTH ( 'Table'[Created On] ) && YEAR ( 'Table'[Report Date] ) = YEAR ( 'Table'[Created On] ), "Y", "N" )
Measure = COUNTROWS ( FILTER ( 'Table', NOT ( 'Table'[Analysis] ) IN { "CLSD" } ) )
Regards,
Update: I have managed to get to this point by adding 2 columns which format the date into year and month:
Now I just need to figure out how to write the IF statement to compare the 2 dates and count all rows not including "CLSD".... I'm still struggling, so I would appreciate any help.
This Calcualted colunm will give you a 1 or a 0 based on the two dates
you can then sum this colunm as a measure to get what your after
Proud to be a Super User!
Hi @Anonymous
You may create a column like below and then create a measure to get the count.
Column = IF ( MONTH ( 'Table'[Report Date] ) = MONTH ( 'Table'[Created On] ) && YEAR ( 'Table'[Report Date] ) = YEAR ( 'Table'[Created On] ), "Y", "N" )
Measure = COUNTROWS ( FILTER ( 'Table', NOT ( 'Table'[Analysis] ) IN { "CLSD" } ) )
Regards,
User | Count |
---|---|
77 | |
77 | |
68 | |
67 | |
49 |
User | Count |
---|---|
108 | |
105 | |
93 | |
83 | |
64 |