Forum Discussion
Determining How Many Days Since Last error
- Anonymous5 years ago
Hi Anonymous ,
I updated my sample pbix file(see attachment), please check whether that is what you want.
Measure =VAR _week =CALCULATE (MAX ( 'Table'[Week of Year] ),FILTER ('Table','Table'[Source] = SELECTEDVALUE ( 'Table'[Source] )&&'Table'[Year]=SELECTEDVALUE('Table'[Year])&& 'Table'[Days of week] < 5))VAR _days =CALCULATE ( SUM ( 'Table'[Days of week] ) )VAR _days1 =CALCULATE (SUM ( 'Table'[Days of week] ),FILTER ('Table','Table'[Source] = SELECTEDVALUE ( 'Table'[Source] )&&'Table'[Year]=SELECTEDVALUE('Table'[Year])&& 'Table'[Week of Year]>= _week))RETURNIF ( ISBLANK ( _week ), _days, _days1 )Measure 2 = SUMX(VALUES('Table'[Source]),SUMX(VALUES('Table'[Year]),[Measure]))Best Regards
Hi Anonymous ,
I created a sample pbix file(see attachment), please check whether that is what you want.
Best Regards
- Anonymous5 years agoNot applicable
Hi Anonymous Thanks for the reply
I have date and week columns in my data. Days of Week column represents number of days without error in that week trying with ur measure but i am getting error i mean values i am geeting is 115 instead of 15- Anonymous5 years agoNot applicable
Hi Anonymous ,
I just add date and week columns in my source data, it works well base on original measures... Could you please provide your sample pbix file with my measure(exclude sensitive data) and the formula if the field Days of Week is from measure or calculated column? By the way, whether include the data from different year? I want to make troubleshooting and find the cause to get the solution base on your scenario. Thank you.
Best Regards
- Anonymous5 years agoNot applicable
Anonymous Thansk for the soultion this worked for me. here i have only one year (2021) values. any idea if i have more that one year of data ...?