Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello!, I'm new with this of Power Bi, and I'm struggling to get a Dax formula to work properly.
I have the following in example.
Week Kilos
1 10
2 20
3 30
4 40
And also, a slicer with the weeks.
I need a Dax that shows in a label the kilos of the week that is max of the slicer.
I.e.
Slicer is from week 2-4, the label has to show 40 Kilos
if Slicer is from week 2-3, the label has to show 30 kilos
Thanks for your help in advance!
Solved! Go to Solution.
@AgustinLopez , Try a measure like
meausre =
var _max = maxx(allselected(Table), Table[week])
return
calculate(sum(Table[Kilos]), filter(Table, Table[week] =_max))
But better to have separate week table
If you are going to use the measure in a card visual, this should suffice:
Measure = MAX(Table1[Kilos])
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
@AgustinLopez , Try a measure like
meausre =
var _max = maxx(allselected(Table), Table[week])
return
calculate(sum(Table[Kilos]), filter(Table, Table[week] =_max))
But better to have separate week table
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 5 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 16 | |
| 8 | |
| 7 | |
| 7 |