Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hi All,
I am trying to create a caluclated column that would show a meeting taking place a month beore each date in the original column, the condition being if the meeting would fall in January or July then the 2nd columns Meeting date should instead reflect is occuring in December or June respecively. it would look like the following:
The general formula sees to be delivering on its function, to recall the month before. However I have noticed some discrepencies in the data - namely the formula is still not skipping January and July month meetings, instead showing meetings to occur then (instead of marking them as December and June month meetings as it should function). Additionally December decision dates are showing October month meetings (instead of November). This is the formula i am using:
Meeting Month =
VAR _sldate =
CALCULATE ( SELECTEDVALUE ( 'Decisions Register (2)'[Latest Decision Due Date] ) )
VAR _twomonthback =
EDATE ( _sldate, -2 )
VAR _onemonthback =
EDATE ( _sldate, -1 )
VAR _p1 =
EOMONTH ( 'Decisions Register (2)'[Latest Decision Due Date], -1 )
VAR _p2 =
EOMONTH ( 'Decisions Register (2)'[Latest Decision Due Date], -2 )
VAR _isbalnkprev =
ISBLANK (
COUNTROWS (
FILTER (
'Decisions Register (2)',
'Decisions Register (2)'[Latest Decision Due Date] > _p2
&& 'Decisions Register (2)'[Latest Decision Due Date] <= _p1
)
)
)
VAR _result =
IF ( _isbalnkprev,_twomonthback,_onemonthback )
RETURN
_result
Here is a sample of the table that is generated, note the aforementioned skipping of November skipping of January and July month meetings, instead showing meetings to occur then (instead of marking them as December and June month meetings as it should function). Additionally December decision dates are showing October month meetings (instead of November):
Latest Decision Due Date | Meeting Month |
Friday, 22 July 2022 | May 2022 |
Monday, 31 August 2020 | July 2020 |
Sunday, 31 December 2023 | October 2023 |
Friday, 8 May 2020 | April 2020 |
Monday, 31 August 2020 | July 2020 |
Sunday, 31 December 2023 | October 2023 |
Thursday, 30 April 2020 | March 2020 |
Friday, 30 October 2020 | September 2020 |
Monday, 31 August 2020 | July 2020 |
Thursday, 1 October 2020 | September 2020 |
Thursday, 1 October 2020 | September 2020 |
Friday, 8 May 2020 | April 2020 |
Sunday, 1 November 2020 | October 2020 |
Thursday, 1 October 2020 | September 2020 |
Friday, 1 May 2020 | April 2020 |
Thursday, 30 April 2020 | March 2020 |
Monday, 31 August 2020 | July 2020 |
Sunday, 31 December 2023 | October 2023 |
Friday, 31 December 2021 | October 2021 |
Monday, 31 August 2020 | July 2020 |
Sunday, 31 December 2023 | October 2023 |
Thursday, 30 April 2020 | March 2020 |
Friday, 30 October 2020 | September 2020 |
Friday, 24 July 2020 | June 2020 |
Friday, 8 May 2020 | April 2020 |
Monday, 31 August 2020 | July 2020 |
Friday, 12 June 2020 | May 2020 |
Friday, 1 May 2020 | April 2020 |
Friday, 22 July 2022 | May 2022 |
Tuesday, 31 March 2020 | February 2020 |
Friday, 31 December 2021 | October 2021 |
Monday, 31 August 2020 | July 2020 |
Sunday, 31 December 2023 | October 2023 |
Thursday, 30 April 2020 | March 2020 |
Friday, 30 October 2020 | September 2020 |
Friday, 8 May 2020 | April 2020 |
Friday, 8 May 2020 | April 2020 |
Friday, 24 July 2020 | June 2020 |
Tuesday, 31 December 2019 | October 2019 |
Friday, 24 July 2020 | June 2020 |
Friday, 31 December 2021 | October 2021 |
Sunday, 31 December 2023 | October 2023 |
Thursday, 30 April 2020 | March 2020 |
Friday, 30 October 2020 | September 2020 |
Friday, 12 June 2020 | May 2020 |
Tuesday, 1 September 2020 | August 2020 |
Friday, 12 June 2020 | May 2020 |
Friday, 1 May 2020 | April 2020 |
Friday, 1 May 2020 | April 2020 |
Monday, 17 January 2022 | December 2021 |
Friday, 12 June 2020 | May 2020 |
Saturday, 29 February 2020 | January 2020 |
Friday, 24 July 2020 | June 2020 |
Monday, 17 January 2022 | December 2021 |
Sunday, 31 December 2023 | October 2023 |
Friday, 30 October 2020 | September 2020 |
Friday, 12 June 2020 | May 2020 |
Sunday, 31 December 2023 | October 2023 |
Thursday, 30 April 2020 | March 2020 |
Friday, 30 October 2020 | September 2020 |
Thursday, 1 October 2020 | September 2020 |
Thursday, 1 October 2020 | September 2020 |
Thursday, 30 April 2020 | March 2020 |
Thursday, 1 October 2020 | September 2020 |
Thursday, 1 October 2020 | September 2020 |
Friday, 1 May 2020 | April 2020 |
Saturday, 29 February 2020 | January 2020 |
Friday, 30 October 2020 | September 2020 |
Monday, 31 August 2020 | July 2020 |
Friday, 12 June 2020 | May 2020 |
Sunday, 31 December 2023 | October 2023 |
Thursday, 30 April 2020 | March 2020 |
Friday, 30 October 2020 | September 2020 |
Monday, 17 January 2022 | December 2021 |
Monday, 17 January 2022 | December 2021 |
Monday, 17 January 2022 | December 2021 |
Friday, 12 June 2020 | May 2020 |
Friday, 12 June 2020 | May 2020 |
Sunday, 31 December 2023 | October 2023 |
Thursday, 30 April 2020 | March 2020 |
Friday, 30 October 2020 | September 2020 |
Sunday, 1 November 2020 | October 2020 |
Friday, 30 October 2020 | September 2020 |
Friday, 30 October 2020 | September 2020 |
Friday, 12 June 2020 | May 2020 |
Friday, 8 May 2020 | April 2020 |
Sunday, 31 December 2023 | October 2023 |
Sunday, 31 December 2023 | October 2023 |
Friday, 12 June 2020 | May 2020 |
Sunday, 31 December 2023 | October 2023 |
Thursday, 30 April 2020 | March 2020 |
Friday, 30 October 2020 | September 2020 |
Friday, 8 May 2020 | April 2020 |
Monday, 31 August 2020 | July 2020 |
Monday, 31 August 2020 | July 2020 |
Sunday, 31 December 2023 | October 2023 |
Thursday, 30 April 2020 | March 2020 |
Friday, 30 October 2020 | September 2020 |
Thursday, 14 September 2023 | July 2023 |
Friday, 30 October 2020 | September 2020 |
Friday, 30 October 2020 | September 2020 |
Thursday, 30 April 2020 | March 2020 |
Friday, 12 June 2020 | May 2020 |
Sunday, 31 December 2023 | October 2023 |
Thursday, 30 April 2020 | March 2020 |
Friday, 30 October 2020 | September 2020 |
Friday, 30 October 2020 | September 2020 |
Friday, 12 June 2020 | May 2020 |
Friday, 24 July 2020 | June 2020 |
Saturday, 1 July 2023 | June 2023 |
Saturday, 29 February 2020 | January 2020 |
Friday, 31 December 2021 | October 2021 |
Friday, 31 December 2021 | October 2021 |
Sunday, 31 December 2023 | October 2023 |
Thursday, 30 April 2020 | March 2020 |
Friday, 30 October 2020 | September 2020 |
Friday, 24 July 2020 | June 2020 |
I have tried creating tinkering with the formula but it has not worked. I would appreciate any assistance as I am a beginner.
Thank you for your time!!
Ankit
Solved! Go to Solution.
@Anonymous , try like
new column =
if( month([Latest Decision Due Date]) in{2,8},
format(date(year([Latest Decision Due Date]),month([latest decision due date])-2,1),"mmm-yy"),
format(date(year([Latest Decision Due Date]),month([latest decision due date])-1,1),"mmm-yy")
)
or
new column =
if( month([Latest Decision Due Date]) in{2,8},
format(date(year([Latest Decision Due Date]),month([latest decision due date])-2,1),"mmmm-yyyy"),
format(date(year([Latest Decision Due Date]),month([latest decision due date])-1,1),"mmmm-yyyy")
)
@Anonymous , try like
new column =
if( month([Latest Decision Due Date]) in{2,8},
format(date(year([Latest Decision Due Date]),month([latest decision due date])-2,1),"mmm-yy"),
format(date(year([Latest Decision Due Date]),month([latest decision due date])-1,1),"mmm-yy")
)
or
new column =
if( month([Latest Decision Due Date]) in{2,8},
format(date(year([Latest Decision Due Date]),month([latest decision due date])-2,1),"mmmm-yyyy"),
format(date(year([Latest Decision Due Date]),month([latest decision due date])-1,1),"mmmm-yyyy")
)
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
92 | |
86 | |
85 | |
66 | |
49 |
User | Count |
---|---|
140 | |
113 | |
106 | |
64 | |
60 |