Forum Discussion
jrhessey
6 years agoFrequent Visitor
Row Number by table group
I'm trying to get a day count inside of a grouped by sum table. I've found some posts here that I think give me a row number in the whole table, not the distinct rows in the summed table. As you ca...
- 6 years ago
Hello jrhessey,
You can create a measure as below:
Index = RANKX(ALLSELECTED(RowNum[RunDate]),CALCULATE(FIRSTDATE(RowNum[RunDate])),,ASC,Dense)And then the below DAX query will help you:
Average Daily Invoice = VAR MTDInvoice = TOTALMTD(SUM(RowNum[Daily Invoice]),RowNum[RunDate]) RETURN DIVIDE(MTDInvoice,[Index])Hope this helps.
rajulshah
6 years agoResident Rockstar
Hello jrhessey,
You can create a measure as below:
Index = RANKX(ALLSELECTED(RowNum[RunDate]),CALCULATE(FIRSTDATE(RowNum[RunDate])),,ASC,Dense)
And then the below DAX query will help you:
Average Daily Invoice =
VAR MTDInvoice = TOTALMTD(SUM(RowNum[Daily Invoice]),RowNum[RunDate])
RETURN DIVIDE(MTDInvoice,[Index])
Hope this helps.