Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
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:
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 45 | |
| 41 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 64 | |
| 32 | |
| 31 | |
| 27 |