Forum Discussion
Ho to make a report which give difference between rows in a table which is entered on different date
- Anonymous9 years ago
Here is the solution which i found on Yammer,
Here are the steps:
1. Create a calculated table 'Start Date' as ALL(Table1[Date]). Rename the only column to [Start Date].
2. Create a calculated table 'End Date' as ALL(Table1[Date]). Rename the only column to [End Date].
3. Create a measure [A Status] as
A Status =
VAR vStartA = CALCULATE(MAXA(Table1[A]), TREATAS(VALUES('Start Date'[Start Date]), Table1[Date]))
VAR vEndA = CALCULATE(MAXA(Table1[A]), TREATAS(VALUES('End Date'[End Date]), Table1[Date]))
RETURN IF(vStartA, IF(vEndA, "Blank()", "Deleted"), IF(vEndA, "Added", "Blank()"))
4. Create two more measures [B Status] and [C Status] in a similar fashion.
5. Create a slicer using 'Start Date'[Start Date].
6. Create a slicer using 'End Date'[End Date].
7. Create a table adding [ID], [A Status], [B Status], [C Status].
Thanks, for the suggestion. But I guess i haven't explained my question properly.
Actually, ID in Table1 repesents some other object which is being processed in batches to decide whether it contain A/B/C or not. If it contains any of them then it will be updated as true or false in DB.
So my task is to provide user to choose two dates, and based on that selection the power bi report give him data that which object's content is changed between two dates.
For example: I select two dates as 3/3/17 and 3/4/17.
Then as per data between two dates selected Object2 and Object3 contents have been changed.
I'll get a table or list any thing, which shows me anything which can give information that between two dates contents for below ids are changed.
| Id | A | B | C |
| 2 | Added | Added | Deleted |
| 3 | Deleted |
Here is the solution which i found on Yammer,
Here are the steps:
1. Create a calculated table 'Start Date' as ALL(Table1[Date]). Rename the only column to [Start Date].
2. Create a calculated table 'End Date' as ALL(Table1[Date]). Rename the only column to [End Date].
3. Create a measure [A Status] as
A Status =
VAR vStartA = CALCULATE(MAXA(Table1[A]), TREATAS(VALUES('Start Date'[Start Date]), Table1[Date]))
VAR vEndA = CALCULATE(MAXA(Table1[A]), TREATAS(VALUES('End Date'[End Date]), Table1[Date]))
RETURN IF(vStartA, IF(vEndA, "Blank()", "Deleted"), IF(vEndA, "Added", "Blank()"))
4. Create two more measures [B Status] and [C Status] in a similar fashion.
5. Create a slicer using 'Start Date'[Start Date].
6. Create a slicer using 'End Date'[End Date].
7. Create a table adding [ID], [A Status], [B Status], [C Status].