Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hi guys!
Can't get my new column or measure to calculate the value in column "PrevRows" in Power Bi.
I want to show the customer how tables grow in the databse between the dates.
Hope you can help me out with solving that.
| ReportDate | Table | Count of rows | What report |
| 2017-03-01 | Table1 | 10 | PrevReport |
| 2017-03-01 | Table2 | 210 | PrevReport |
| 2017-04-20 | Table1 | 30 | ThisReport |
| 2017-04-20 | Table2 | 235 | ThisReport |
And I need to calculate this
| PrevRows | Diff |
| 10 | 20 |
| 210 | 25 |
Regards
Tobias
Solved! Go to Solution.
Thanks for your help.
I have solved it after reading this (https://community.powerbi.com/t5/Desktop/Find-value-for-first-and-last-date-by-person/m-p/62016).
Regards
Tobias
Diff = CALCULATE(SUM([Count of rows]),FILTER(Table,[What report] = "ThisReport")) - CALCULATE(SUM([Count of rows]),FILTER(Table,[What report] = "PrevReport"))
Put Table column and this measure into a table.
Hi Tobias,
You should be able to accomplish this using a DAX Measure or in Power Query. First question. Are the columns "Table" and "What Report" actual columns in the table output? Second question if yes, are the table names or report names fixed or do they change? If they are columns, and they're fixed names. Then you should be able to use two CALCULATE queries for each, and just find the difference between the values.
- Column "table" is. I have added column "What report" when tried to solve this.
- The reason for the column "What report" is to have a fixed value.
(Column "What report" is defind in a related table "Report_tbl", with column "Date","What report")
- The table names are not fixed, it is the top 10 tables in customer database.
Ok so this is helping me consider the right direction. My next question then, so for the "current" or "previous report flags, how many distinct table names would be under a distinct date? If it's always two you could use FIRST/LAST NONBLANK functions to call those rows when calculating current or previous report counts. If it's more than two then we'd need to figure out how to find each distinct table name and compare the count values with the current and previous dates.
Thanks for your help.
I have solved it after reading this (https://community.powerbi.com/t5/Desktop/Find-value-for-first-and-last-date-by-person/m-p/62016).
Regards
Tobias
The table can only exist one time for "Current" and one time for "Previous".
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 32 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 66 | |
| 58 | |
| 31 | |
| 25 | |
| 24 |