Forum Discussion
trotsale
9 years agoRegular Visitor
Calculating difference between rows by date
Hello! I have a problem and here it is: In my Power Bi I have a table with report which is getting data from local folder. A key is date, which is adding as a column on every refresh. It look...
- Anonymous9 years ago
Hi trotsale
Try out this method. This method grabs the device ids from last month and subtracts them from device ids this month.
DevicesByDate difference last month compared to this month = CALCULATE(COUNTROWS('Test');DISTINCT('Test'[Date]);DATEADD(DATESBETWEEN(Test[Date];STARTOFMONTH(Test[Date]);ENDOFMONTH(Test[Date]));-1;MONTH)) - CALCULATE(COUNTROWS('Test');DISTINCT('Test'[Date]);DATESINPERIOD(Test[Date];LASTDATE(Test[Date]);-1;MONTH))
Best,
Martin
Anonymous
9 years agoNot applicable
trotsale Did it work out for you?
trotsale
9 years agoRegular Visitor
Thank you so much for help!
It works now, but it displays uptake only when graphic is shown by quarter or year. When I choose display by month, It shows me number of devices. Maybe I should change dates period?By year
By month