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.
Solved! Go to Solution.
Hi @yolandacb Try below code to create a calculated column:
Is PM =
IF (
MONTH('Append'[Date]) = MONTH(TODAY()) - 1 &&
YEAR('Append'[Date]) = YEAR(TODAY()),
"PM",
"NO"
)
Output:
Hope this helps!!
If this solved your problem, please accept it as a solution and a kudos!!
Best Regards,
Shahariar Hafiz
hi @yolandacb ,
you can also try like:
Is PM =
IF (
EOMONTH('Append'[Date], 0) = EOMONTH(TODAY(), -1),
"PM",
"NO"
)
@yolandacb You are unable to find 'Append'[Previous Month] beacuse Append and FinDate are two different tables which might not have relationship between them.
Alternatively if you wan create a column to decide Is PM you can try below code it calculates based on 'FinDate'[Date]
IsPM =
IF (
'FinDate'[Date] >= EOMONTH(TODAY(), -2) + 1 &&
'FinDate'[Date] <= EOMONTH(TODAY(), -1),
"PM",
"NO"
)
For some reason this didn't work. I get this error:
A single value for column 'Date' in table 'FinDate' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.
Can you help?
Hi @yolandacb Try below code to create a calculated column:
Is PM =
IF (
MONTH('Append'[Date]) = MONTH(TODAY()) - 1 &&
YEAR('Append'[Date]) = YEAR(TODAY()),
"PM",
"NO"
)
Output:
Hope this helps!!
If this solved your problem, please accept it as a solution and a kudos!!
Best Regards,
Shahariar Hafiz
Thank you. When I try to use your suggested code, I can't find the column (it doesn't show). Only measures are suggested.
That was a example. You need to use your date column.
Sorry, I was creating a measure rather than a column. When I went to create a column it worked. THank you
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
21 | |
15 | |
14 | |
11 | |
7 |
User | Count |
---|---|
25 | |
24 | |
12 | |
12 | |
11 |