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 date column and i need to count the rows for a specific month. Such as an example, is there a way to create a measure that will count all the rows that contain "March"? I have tried a few things, but not making any progress.
Thanks in advance
Solved! Go to Solution.
Hi @StuartSmith ,
How about this:
TomsMeasure = CALCULATE ( COUNTROWS( Table ),
FILTER ( Date, Date[DateMonth] = "March" ) )
Hope that measure gives you some kind of start 🙂
[Edit] In case you do not have a date dimension this might work better:
TomsMeasure = CALCULATE ( COUNTROWS( Table ), FILTER ( Table, Table[Date].[Month] = "March" )
)
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
Also happily accepting Kudos 🙂 |
Feel free to connect with me on LinkedIn! |
#proudtobeasuperuser |
Thanks, that worked!
Hi @StuartSmith ,
How about this:
TomsMeasure = CALCULATE ( COUNTROWS( Table ),
FILTER ( Date, Date[DateMonth] = "March" ) )
Hope that measure gives you some kind of start 🙂
[Edit] In case you do not have a date dimension this might work better:
TomsMeasure = CALCULATE ( COUNTROWS( Table ), FILTER ( Table, Table[Date].[Month] = "March" )
)
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
Also happily accepting Kudos 🙂 |
Feel free to connect with me on LinkedIn! |
#proudtobeasuperuser |
Actually, your first suggestion worked...
Hi @StuartSmith ,
Oh, awesome! I did not know you had a date dimension 🙂
I'll update my previous answer so you can mark it as a solution!
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
Also happily accepting Kudos 🙂 |
Feel free to connect with me on LinkedIn! |
#proudtobeasuperuser |
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 |
---|---|
106 | |
98 | |
75 | |
63 | |
62 |
User | Count |
---|---|
135 | |
105 | |
104 | |
80 | |
65 |