Forum Discussion
amolgharge
1 year agoNew Member
Display first 5 rows using DAX in Power BI
I am new to Power BI. I have a table named 'Mobile Sales Data' having two columns 'Sales Date' and 'Total Sale' as shown here. Its date wise sale amount. I want to show - 1. First 5 rows i.e. 09...
- 1 year ago
If you want to create a measure to filter the first 5 rows in a visual, you can use the following DAX formula:
DAX
First5RowsMeasure =
IF(
RANKX(
ALL('Mobile Sales Data'),
'Mobile Sales Data'[Sales Date],
,
ASC
) <= 5,
1,
0
)You can then use this measure in your visual filters to show only the rows where First5RowsMeasure equals 1.
V-yubandi-msft
Community Support
1 year agoHi amolgharge ,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.