This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hello,
I am pretty new to dax and your help will be appreciated.
I have a table and I need to filter the data from this month.
I have no clue how to do it.
thanks in advance!
Solved! Go to Solution.
@astridaku You can accomplish this by adding a calculated column to your table. Use the following dax calc and set your outputs to identify the current month.
IsCurrentMonth = IF(MONTH(test[Date])=Month(NOW()), "Current Month", "Other")
or rather than text I usually just use bits 1,0 if I'm just filtering on the back end (not in slicers)
IsCurrentMonth = IF(MONTH(test[Date])=Month(NOW()), 1, 0)
Then in your page/report/visual you can filter to only show current, or use a slicer
@astridaku You can accomplish this by adding a calculated column to your table. Use the following dax calc and set your outputs to identify the current month.
IsCurrentMonth = IF(MONTH(test[Date])=Month(NOW()), "Current Month", "Other")
or rather than text I usually just use bits 1,0 if I'm just filtering on the back end (not in slicers)
IsCurrentMonth = IF(MONTH(test[Date])=Month(NOW()), 1, 0)
Then in your page/report/visual you can filter to only show current, or use a slicer
@Anonymous @astridaku correct me if I am wrong ( I write without testing ) but if you have more than 2 years it will display "current month" for 2 months value.
Could it be like
IsCurrentMonth =
IF (
AND (
YEAR ( test[Date] ) = YEAR ( NOW () ),
MONTH ( test[Date] ) = MONTH ( NOW () )
),
"Current Month",
"Other"
)
Or, in Power Query:
// Power Query // Add custom column CurrentMonthFlag = Date.IsInCurrentMonth( [Date] )
the Power Query custom column is much easier !
thanks so much!!!
it worked
@astridaku If the solution is working for you please mark it as Answered in order to help other community members.
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 38 | |
| 38 | |
| 31 | |
| 22 | |
| 15 |
| User | Count |
|---|---|
| 74 | |
| 61 | |
| 31 | |
| 31 | |
| 23 |