Forum Discussion
Thennarasu_R
Responsive Resident
3 years agoHow to Took TopN Values
Hi,
I have one Date Column and then created One serial No Column 1, 2,3,....etc based on Date Column.
My need is 3 task, max Top 7, Top 14,top 30 Days in Dax
can you anyone help me this one
Hi,
Please check the below picture and the attached pbix file.
Value top seven: = CALCULATE ( SUM ( Data[Value] ), KEEPFILTERS ( TOPN ( 7, ALL ( Data[Date] ), CALCULATE ( SUM ( Data[Value] ) ), ASC ) ) )
4 Replies
- Jihwan_Kim
Super User
Hi,
Please check the below picture and the attached pbix file.
Value top seven: = CALCULATE ( SUM ( Data[Value] ), KEEPFILTERS ( TOPN ( 7, ALL ( Data[Date] ), CALCULATE ( SUM ( Data[Value] ) ), ASC ) ) )- Thennarasu_R
Responsive Resident
Thanks
- Thennarasu_R
Responsive Resident
It'S not workimg I'm geeting error
- Jihwan_Kim
Super User
Please share your sample pbix file's link, and then I can try to look into it.
Or, please check whether you are creating a measure or a column.
The DAX formula that I provided is for creating a measure.
Thanks.