Forum Discussion
DAX
I want to create a measure;
Fetch the Month name from Date column
- You can try this
MonthName=
VAR Date_= SELECTEDVALUE(Table[DateColumn])
RETURN FORMAT(Date_, "mmmm")
Note: this returns a value if there is only one date in the current filter context.
If this isn't what your desired result, please provide a sample date and your expected result.
7 Replies
- danextianSuper UserYou can try this
MonthName=
VAR Date_= SELECTEDVALUE(Table[DateColumn])
RETURN FORMAT(Date_, "mmmm")
Note: this returns a value if there is only one date in the current filter context.
If this isn't what your desired result, please provide a sample date and your expected result.- ssvrHelper III
May be you are right. But my case is:
I Connected the SAP-Cube to Power BI.
In this senario New Column is Disabled and there is only (New Measure) i can created.
So, In this senario Please suggest me the DAX for below requirements:
- Get the Month Name from #Date column
- Diffarence between two #Dates ( = ReleaseDt - OpenDt)
Thanks.
- ssvrHelper III
I need to create only Measure not Column
Agening between two dates = Closeddt - Releasedt
- danextianSuper User
You may try the formula I posted as a measure.
- ssvrHelper III
Hi danextian ,
Can you help me out with this query
One of my mate share dis DAX (Measure) for date diffarece. But i got some errors with query can you fix this
[ClosedDt-CreatedDt]
Daydiff = VAR Created = MAX('Dates'[CreatedDt])
VAR Closed = MAX('Dates'[ClosedDt])
VAR dd=-1
IF (Closed>Created) {
dd=DATEDIFF(Created;Closed;days)
} else {
dd= DATEDIFF(Closed;Created;days)
}
RETURN dd
- ssvrHelper III
I Connected the SAP-Cube to Power BI.
In this senario New Column is Disabled and there is only (New Measure) i can created.
So, In this senario Please suggest me the DAX for below requirements:
- Get the Month Name from #Date column
- Diffarence between two #Dates ( = ReleaseDt - OpenDt)
Thanks.