Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I have a column called 'Date' and it has dates all the way till April 2021. I then created a measure called 'Latest Date' with the following formula:
Solved! Go to Solution.
@natasha519 do you mean this, pbix is attached
forTOPN =
IF (
'Table'[Date] = CALCULATE ( MAX ( 'Table'[Date] ), ALL ( 'Table' ) )
|| 'Table'[Date]
= CALCULATE ( MAX ( 'Table'[Date] ), ALL ( 'Table' ) ) - 365,
1,
0
)
I tried this:
@natasha519 can you try htis
Measure =
VAR LatestDate = CALCULATE(MAX('Table'[Date]), ALL('Table'))
VAR _x = IF (MIN('Table'[Date]) = LatestDate,LatestDate-365)
RETURN _x
I would want a 1 in the new column, so 1 for April 2020 and then 1 for April 2021, and the rest of the values would be 0
@natasha519 do you mean this, pbix is attached
forTOPN =
IF (
'Table'[Date] = CALCULATE ( MAX ( 'Table'[Date] ), ALL ( 'Table' ) )
|| 'Table'[Date]
= CALCULATE ( MAX ( 'Table'[Date] ), ALL ( 'Table' ) ) - 365,
1,
0
)
@natasha519 did you have a chance to look into the solution I provided?
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
10 | |
10 | |
10 | |
9 |
User | Count |
---|---|
20 | |
13 | |
12 | |
11 | |
8 |