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.
Hi all,
I want to count the days in the month January, February, etc.
How can I make a column that will go to the calendar of 2020 and input the number of that month.
For example January 2020 – 31 days, February 2020-29 days.
I found a formula in the community but it doesn’t work for me:
DaysInMonthColumn=SWITCH(MONTH([Date]), 1, 31, 2, 29, 3, 31, 4, 30
, 5, 31, 6, 30, 7, 31, 8, 31
, 9, 30, 10, 31, 11, 30, 12, 31
, BLANK() )
The table that I created shows the sales figures per month. I calculated the Days in Year with the COUNTROWS function.
Kind regards,
Clélia
Solved! Go to Solution.
Hi @CleliaComes ,
You can try creating a calculated column as follows:
daysInMonth =
DAY ( EOMONTH ( ClothingSales[Date], 0 ) )
I tried it at my end and gives me the following result:
Thanks,
Pragati
Thank you very much it works!
Hi @CleliaComes ,
You can try creating a calculated column as follows:
daysInMonth =
DAY ( EOMONTH ( ClothingSales[Date], 0 ) )
I tried it at my end and gives me the following result:
Thanks,
Pragati
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 |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |