Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi All,
I want maximum Value in each month from last 2 year comparison. Kindly help me if data is like below
Solved! Go to Solution.
@Anonymous
write the following measure :
(this will take into consideration current year and previous year )
m =
var currentyear = year ( today() )
var ds =
filter (
tbl_name , year >= currentyear - 1 )
RETURN
maxx( ds , value )
NB: if you want to take only prev 2 years excluding the current year, change the filter to this :
var ds =
filter (
tbl_name , year >= currentyear - 2 && year < currentyear )
tbl_name being the table containing your data, and value being the column name with the values you want to display .
hope this helps .
If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution ✅
It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠
Hello @Anonymous please create below measure
Max Value = CALCULATE(MAXX('Table','Table'[Value]),ALLEXCEPT('Table','Table'[Month]))
If this post helps, then please consider accepting it as the solution to help other members find it more quickly. Thank You!!
Hello @Anonymous please create below measure
Max Value = CALCULATE(MAXX('Table','Table'[Value]),ALLEXCEPT('Table','Table'[Month]))
If this post helps, then please consider accepting it as the solution to help other members find it more quickly. Thank You!!
@Anonymous
write the following measure :
(this will take into consideration current year and previous year )
m =
var currentyear = year ( today() )
var ds =
filter (
tbl_name , year >= currentyear - 1 )
RETURN
maxx( ds , value )
NB: if you want to take only prev 2 years excluding the current year, change the filter to this :
var ds =
filter (
tbl_name , year >= currentyear - 2 && year < currentyear )
tbl_name being the table containing your data, and value being the column name with the values you want to display .
hope this helps .
If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution ✅
It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
85 | |
79 | |
54 | |
39 | |
35 |
User | Count |
---|---|
102 | |
80 | |
48 | |
48 | |
48 |