Forum Discussion
Retain current value of column
- Anonymous7 years ago
Hi SNawalKishore1 ,
Thanks for your reply.
I included Modified date in my column and used following formula to get the desired result:
CALCULATE( COUNTROWS('Table1'), FILTER(Table1','Table1'[User]='Table2'User]), FILTER(ALLSELECTED('Table1'),'Table1'[IsReviewed]="Yes"), FILTER('Table1','Table1'[ModifiedDate] <= TODAY() - WEEKDAY(TODAY() -3)) )Cheers,
Sumit
Hi @ v-xuding-msft,
Thank for your reply. But my problem is little complicated that that. May be I should have described it in detail earlier.
Let me put it in simple way:
I have a master table 'Table 1' and I created antother table 'Table 2' using summarize on 'Table 1'. In 'Table 2' I have added some additional columns.
I want to update columns in Table 2. Third column 'Total Reviewed' will change on daily basis but second column will only update on Tuesday.
On wednasday if user have reviewed some of the tasks last 2 columns will change to show the progress but not the second column.
Wednesday View
I am using following formula that gives me total reviewed on current date and time:
CALCULATE (
COUNTROWS('Table1'),
FILTER('Table 1','Table 1'[User]=[User]),
FILTER('Table 1','Table 1'[Reviewed]="Y")
)But, when I put this formula in IF condition, it gives me correct result on Tuesdays. But, on other days it leaves the second column blank.
IF (
FORMAT ( WEEKDAY ( TODAY () ), "dddd" ) = "Tuesday",
CALCULATE (
COUNTROWS('Table1'),
FILTER('Table 1','Table 1'[User]=[User]),
FILTER('Table 1','Table 1'[Reviewed]="Y")
)
)Note that I havent specified any value for false condition.
I tried using 'SWITCH' instead of IF wich also returned same result.
May be there isnt a DAX way to achive what I want to do here. Need to figure out another way to do this.
Hello Anonymous,
Please find attached PBIX (URL) and let me know is this suffice.
Cheers,
Nawal
+91-9866755720 | Power BI Consultant
- Anonymous7 years agoNot applicable
Hi SNawalKishore1 ,
Thanks for your reply.
I included Modified date in my column and used following formula to get the desired result:
CALCULATE( COUNTROWS('Table1'), FILTER(Table1','Table1'[User]='Table2'User]), FILTER(ALLSELECTED('Table1'),'Table1'[IsReviewed]="Yes"), FILTER('Table1','Table1'[ModifiedDate] <= TODAY() - WEEKDAY(TODAY() -3)) )Cheers,
Sumit