Forum Discussion
MatthewMcL
8 years agoFrequent Visitor
Transaction level date to Rolling Time Summary
Hello, I am very new to PowerBI, DAX and M Query but I am very familiar with general SQL Queries, Excel and general programming. I’ve been asked to develop something in powerbi and I’ve been hittin...
- Anonymous8 years ago
Hmm, not sure if you want to get the following results.
If it is, first create a calcuated column and use the following DAX to add Rank Number
Rank = RANKX(Sold,Sold[Date],,ASC,Dense)
Then, create another calucated column and use the DAX below to get the cumulative sum in 2 days by item name
2Days_Sum = CALCULATE(SUM(Sold[Sold]),ALLEXCEPT(Sold,Sold[Item Name]),Sold[Rank]<=EARLIER(Sold[Rank])&&Sold[Rank]>EARLIER(Sold[Rank])-2)
Anonymous
8 years agoNot applicable
Hmm, not sure if you want to get the following results.
If it is, first create a calcuated column and use the following DAX to add Rank Number
Rank = RANKX(Sold,Sold[Date],,ASC,Dense)
Then, create another calucated column and use the DAX below to get the cumulative sum in 2 days by item name
2Days_Sum = CALCULATE(SUM(Sold[Sold]),ALLEXCEPT(Sold,Sold[Item Name]),Sold[Rank]<=EARLIER(Sold[Rank])&&Sold[Rank]>EARLIER(Sold[Rank])-2)
MatthewMcL
8 years agoFrequent Visitor
This is exactly what I was looking for. Thank you!