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 moreShape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.
Hello,
I am trying to write a Dax to show the selected year. But when no year is selected in the slicer, I want to the title to show the Max value of the date.
I worte:
Dates =
Solved! Go to Solution.
@Anonymous , Please check parenthesis position in your measure
try like
meausre =
var _max = maxx(allselected(dates), Dates[Dates])
return
maxx(filter(Dates, Dates[Date] =_max), dates[year month])
@Anonymous , use in place of
SELECTEDVALUE(Dates[Year Month], (MAX(Dates[Year Month])))
Use this
maxx(filter(Dates, Dates[Date] = maxx(allselected(dates), Dates[Dates]) ), dates[year month])
or
maxx(filter(allselected(dates), Dates[Date] = maxx(allselected(dates), Dates[Dates]) ), dates[year month])
Thanks @amitchandak for your reply. I tried both Dax measures, but I get an error message from both. Am I doing anything wrong?
Thanks
@Anonymous , Please check parenthesis position in your measure
try like
meausre =
var _max = maxx(allselected(dates), Dates[Dates])
return
maxx(filter(Dates, Dates[Date] =_max), dates[year month])
User | Count |
---|---|
93 | |
92 | |
85 | |
83 | |
49 |
User | Count |
---|---|
150 | |
142 | |
112 | |
73 | |
55 |