Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Sign up nowGet Fabric certified for FREE! Don't miss your chance! Learn more
I am trying to achieve TOP & keep getting BOTTOM (error).
DAX used:
Solved! Go to Solution.
Hi @celine9090 ,
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 @celine9090 ,
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 @celine9090 ,
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:
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 65 | |
| 64 | |
| 49 | |
| 21 | |
| 18 |
| User | Count |
|---|---|
| 119 | |
| 117 | |
| 38 | |
| 36 | |
| 29 |