This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
I am trying to achieve TOP & keep getting BOTTOM (error).
DAX used:
Solved! Go to Solution.
Hi @Anonymous ,
I created the data:
Table:
Date Table:
Here are the steps you can follow:
1. Create meausre.
Total = SUMX(FILTER(ALL('Table'),'Table'[Month]=MAX('Date'[Month])),'Table'[amount])
Result:
Flag =
var _selectvalue=SELECTEDVALUE('Slice'[Month])
return
IF(MAX('Date'[Month]) <=_selectvalue,1,0)
2. Use enter data to create a Slice table.
3. Set the Month of the Slice table as the slicer.
4. Put Flag into Filter, set is =1, and apply filter.
5. Result.
When the slicer is 3, the data of the previous three months is displayed.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
I created the data:
Table:
Date Table:
Here are the steps you can follow:
1. Create meausre.
Total = SUMX(FILTER(ALL('Table'),'Table'[Month]=MAX('Date'[Month])),'Table'[amount])
Result:
Flag =
var _selectvalue=SELECTEDVALUE('Slice'[Month])
return
IF(MAX('Date'[Month]) <=_selectvalue,1,0)
2. Use enter data to create a Slice table.
3. Set the Month of the Slice table as the slicer.
4. Put Flag into Filter, set is =1, and apply filter.
5. Result.
When the slicer is 3, the data of the previous three months is displayed.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Bump..
Hey @Anonymous ,
can you create a new measure with "selectedvalue('Date'[Month])" and return that in a card visual?
Does it return "3" or "March"?
If it returns "March" then the formula with > 4 wouldn't work. You could then do a lookup.
Let me konw, I can help you with that.
Hello.. it returns a "3" not march so im confused why it wouldn't work!
Here is the [date] table if anything can be used:
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 36 | |
| 28 | |
| 27 | |
| 20 | |
| 18 |
| User | Count |
|---|---|
| 67 | |
| 35 | |
| 33 | |
| 25 | |
| 24 |