Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi,
I would like to count row that contain month January, then feb and so on. However the data that i have is not structured. Some are January. Some are January- February. Any shortcuts?
Column =
If(
CONTAINSSTRING('Table'[Month], "January")
|| CONTAINSSTRING('Table'[Month], "February")
|| CONTAINSSTRING('Table'[Month], "March")
|| CONTAINSSTRING('Table'[Month], "April")
|| CONTAINSSTRING('Table'[Month], "May")
|| CONTAINSSTRING('Table'[Month], "June")
|| CONTAINSSTRING('Table'[Month], "July")
|| CONTAINSSTRING('Table'[Month], "August")
|| CONTAINSSTRING('Table'[Month], "September")
|| CONTAINSSTRING('Table'[Month], "October")
|| CONTAINSSTRING('Table'[Month], "November")
|| CONTAINSSTRING('Table'[Month], "December"),
1,
0
)
Then create a measure in which you can do 2 things to get the countrows of requirement.
Measure2 = CALCULATE( COUNTROWS('Table'), 'Table'[Column]=1)
or
CountRowsMeasure = SUM('Table'[Column])
Thank you.
If my answer helps you, please mark it as solution.
Hi @Nyxza
I hope this is what you're looking for
Please refer to attached sample file with the proposed solution
Month Count =
SUMX (
VALUES ( 'Month Filter'[Month] ),
COUNTROWS (
FILTER (
'Table',
CONTAINSSTRING ( 'Table'[Month], 'Month Filter'[Month] )
)
)
)
User | Count |
---|---|
53 | |
35 | |
20 | |
15 | |
14 |
User | Count |
---|---|
94 | |
76 | |
36 | |
22 | |
18 |