Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello 🙂
I am currently trying to create a column for the current month. I have created a DimDate Table where i want the column to be. I have used the following code to make a yes/no indication according to, if the month is the current month. I have used the following code:
IsToday = var Currentrowdate = FORMAT(DimDate[Date]; "mm/yyyy") var istoday = FORMAT(NOW(); "mm/yyyy") return IF(istoday = Currentrowdate; "Yes"; "No")
I would like the current month to start from the 16th-15th in the next month. So for example from the 16th of July to the 15th of August. It should be possible to auto update the current month, so that code have to be dynamic.
Thank you in advance 🙂
Solved! Go to Solution.
@Anonymous
I found a way to make it work! I just changed your code a bit. Thank you so much! the code is:
FNyear = Var First = FORMAT(IF(DimDate[DayofMonth]>=16;DATE(DimDate[år];DimDate[Monthof Year]+1;16);IF(DimDate[DayofMonth]<=15;DATE(DimDate[år];DimDate[Monthof Year];16)));"MM/YYYY") var second = FORMAT(NOW();"MM/YYYY") return IF(First = second;"yes";"No")
hi @Anonymous ,
see this one,
Hi @Anonymous
I found a solution! 😄
the code is :
Lastmonth = Var First = FORMAT(IF(DimDate[DayofMonth]>=16;DATE(DimDate[år];DimDate[Monthof Year]+2;16);IF(DimDate[DayofMonth]<=15;DATE(DimDate[år];DimDate[Monthof Year]+1;16)));"MM/YYYY") var second = FORMAT(NOW();"MM/YYYY") return IF(First = second;"yes";"No")
Thank you so much for your help ! 😄
@Anonymous
I found a way to make it work! I just changed your code a bit. Thank you so much! the code is:
FNyear = Var First = FORMAT(IF(DimDate[DayofMonth]>=16;DATE(DimDate[år];DimDate[Monthof Year]+1;16);IF(DimDate[DayofMonth]<=15;DATE(DimDate[år];DimDate[Monthof Year];16)));"MM/YYYY") var second = FORMAT(NOW();"MM/YYYY") return IF(First = second;"yes";"No")
hi @Anonymous ,
Try this formula,
hi @Anonymous
It almost works! 😄
I want the current month to start from the 16th of last month. So from the 16th of july. The code you have provided gave me the current month from the 16th of august. I have tried to change the code but i can not get it to work so that the start of the month is for the 16th of last month.
hi @Anonymous ,
see this one,
Hi @Anonymous
I found a solution! 😄
the code is :
Lastmonth = Var First = FORMAT(IF(DimDate[DayofMonth]>=16;DATE(DimDate[år];DimDate[Monthof Year]+2;16);IF(DimDate[DayofMonth]<=15;DATE(DimDate[år];DimDate[Monthof Year]+1;16)));"MM/YYYY") var second = FORMAT(NOW();"MM/YYYY") return IF(First = second;"yes";"No")
Thank you so much for your help ! 😄
User | Count |
---|---|
117 | |
75 | |
62 | |
50 | |
44 |
User | Count |
---|---|
174 | |
125 | |
60 | |
60 | |
57 |