Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi All,
I would like to get next month from a column "Modified" (which is of date data type). if the status column is "Completed".
something like this.
MeasureNextmonth = if (status == 'Completed')
{
NEXTMONTH('Tablename'[Modified])
}
also in dax function i can only access measure colums. How do i write expressions based on default columns loaded during transformation stage
Solved! Go to Solution.
This formula will work for a new column, if you want to create a measure, you need to adjust it as below:
https://www.sqlbi.com/articles/calculated-columns-and-measures-in-dax/
https://radacad.com/measure-vs-calculated-column-the-mysterious-question-not
Regards,
Lin
@kannanAhammed , not very clear, Measure would be like
if (max(status) = 'Completed',NEXTMONTH('Tablename'[Modified]),blank())
Hi,
Try below measrue
Measure Nextmonth = IF (Status = "Modified", EOMONTH(H10,0)+1 , EOMONTH(H10,-1)+1)
This gives next month first date by defualt and you can use format function to get desired format.
Appreciate a Kudos! 🙂
If this helps and resolves the issue, please mark it as a Solution! 🙂
Regards,
N V Durga Prasad
Thank you,
Measure Nextmonth = IF (Status = "Modified", EOMONTH(H10,0)+1 , EOMONTH(H10,-1)+1)
But i am not able to type "Status" its only accepting Measure column not other colum to be added in the IF expression.
This formula will work for a new column, if you want to create a measure, you need to adjust it as below:
https://www.sqlbi.com/articles/calculated-columns-and-measures-in-dax/
https://radacad.com/measure-vs-calculated-column-the-mysterious-question-not
Regards,
Lin
Thank you, it worked
few doubts,
1) Max() return the largest value. How is this working in this expression.
2) when i tried using existing column in expression the fornula always shows error. but when i use it inside max column it worked.
please excuse my English as its not my first language.
Measure is a summary value by its row context in a visual, so MAX/MIN has the same logic.
https://www.sqlbi.com/articles/calculated-columns-and-measures-in-dax/
Regards,
Lin
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 38 | |
| 38 | |
| 28 | |
| 27 |
| User | Count |
|---|---|
| 124 | |
| 88 | |
| 73 | |
| 66 | |
| 65 |