Forum Discussion
Help with Matrix Chart
- 4 years ago
Hi fbostan1
Do you have date column or date table in the model? If so, we can consider using date related functions to move back to a previous month end date and compare it with the month value on the column. If you only have YearMonth values in the source table, we need to use other methods.
For example
New Month+1 = var lastMonth = VALUE(FORMAT(EOMONTH(TODAY(),-1),"yyyymm")) return IF(MAX('Table'[YearMonth])<=lastMonth,[Month+1],BLANK())You need to modify the code for variable lastMonth in above measure according to your tables.
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
Hi fbostan1
Do you have date column or date table in the model? If so, we can consider using date related functions to move back to a previous month end date and compare it with the month value on the column. If you only have YearMonth values in the source table, we need to use other methods.
For example
New Month+1 =
var lastMonth = VALUE(FORMAT(EOMONTH(TODAY(),-1),"yyyymm"))
return
IF(MAX('Table'[YearMonth])<=lastMonth,[Month+1],BLANK())
You need to modify the code for variable lastMonth in above measure according to your tables.
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.