Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi
I have a field that contains dates and want to just take out the month so I can plot a series of data points against that single month value instead of a range of date. Is there a function/measure/dax that will look at the date and return just the month value from it?
THanks!
Paul
Solved! Go to Solution.
Hi @Anonymous ,
Try:
MONTH([date])
This will give you the month NUMBER (e.g. Jan = 1, Feb = 2 etc.).
If you want this to be more user-friendly, you could add a SWITCH(), something like this:
MyMonth =
SWITCH(
TRUE(),
MONTH([date]) = 1, "Jan",
MONTH([date]) = 2, "Feb"... etc.
Good luck
Proud to be a Datanaut!
Hi @Anonymous ,
Try:
MONTH([date])
This will give you the month NUMBER (e.g. Jan = 1, Feb = 2 etc.).
If you want this to be more user-friendly, you could add a SWITCH(), something like this:
MyMonth =
SWITCH(
TRUE(),
MONTH([date]) = 1, "Jan",
MONTH([date]) = 2, "Feb"... etc.
Good luck
Proud to be a Datanaut!
Ah, yes. Do what @az38 said. Way tidier.
@Anonymous
Proud to be a Datanaut!
User | Count |
---|---|
47 | |
27 | |
23 | |
18 | |
15 |
User | Count |
---|---|
55 | |
34 | |
18 | |
17 | |
15 |