Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Irrespective of what the start date is, the M2, M3 , M4 should take the next month of the M1 start date and it is grouped into Projects also (the first column).
Hi Santhosh ,
Try this one it will help u .
Here 'Test Table' as Your Table name
Month_Name =
var Proj_Name = 'Test Table'[Project]
var Len_Group = len('Test Table'[Group]) - 1
var Group_Number = value(Right( 'Test Table'[Group] , Len_Group))
var Result =IF(Group_Number=1, FORMAT('Test Table'[Start Date],"MMMM") ,
FORMAT( CALCULATE( DATEADD('Test Table'[Start Date],Group_Number-1,MONTH) ,
FILTER(ALL('Test Table'),AND('Test Table'[Project]=Proj_Name,
'Test Table'[Group]="M1"))
) , "MMMM")
)
return Result
Let me know if it is not helping u dude
Hi Baskar,
The Code is Fantastic.
One more help, can the year also be associated with month and also there can be empty date column, But M1 will always have the date. It has to add one month based on the M1 column with the year attached to it.
Cool Man we can do.
Relpace "MMM" with "MMM-YY"
It will made u happy .
Cheers 🙂
Thanks Baskar
One more small issue, there are blank values in the table. I am not able to know y.
Can u please give your Start Date
The start date is 01/07/2016 for the above project. But the count is moving fine, suddenly some spaces are getting created in between. For other project it shows full and some it skips M21 etc.
Hi Santhosh ,
Actually prob in Dax end , please have a look on this link
https://blog.crossjoin.co.uk/2012/01/06/the-dax-dateadd-function-and-missing-dates/
but anyhow i will help with another way , give me some more time 🙂
Thanks Baskar.
Hi @santoshrnath,
Was the suggestion from @Baskar helpful for you? Was the issue solved?
Best Regards,
Qiuyun Yu
Yes
@santoshrnath Glad to hear the issue is gone. would you please mark a helpful reply as an answer so that we can close this thread?
Best Regards,
Qiuyun Yu
Hi Baskar,
The Code is Fantastic.
One more help, can the year also be associated with month and also there can be empty date column, But M1 will always have the date. It has to add one month based on the M1 column with the year attached to it.
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
107 | |
96 | |
92 | |
87 | |
69 |
User | Count |
---|---|
165 | |
130 | |
129 | |
102 | |
98 |