Many thanks!
Let me share some thoughts after testing.
The total seems to be not correct and it disappears if the date is filtered.
Can you please think of any other idea? WrongTotal_v2.pbix (156.3 KB)
okay - the ISFILTERED is what’s causing the totals to vanish once you start filtering the table, returning to your HASONEVALUE solution fixes that part.
But as for the total being wrong, probably the multi-day portion of the formula needs to iterate over a virtual table, as you were using in your first solution.
Putting out a call to those more expert than myself in virtual tables: @BrianJ, @Melissa if either of you has time to weigh in, I think I’ve confused more than helped here
Thanks for your effort.
Numbers in the column “OL RE after 12” should be moved down as in the column “Measure 1”.
This has been achieved, but the total is wrong, therefore I have to create Measure 2 to have the total correct.
The question remains, how to do it in one go?
First, it seems easy, but apparently it’s not Thanks a lot!
Now that I think of it you are just trying to get the values from date just prior to to the current cell, 7/3 gets the value from 7/2, 8/2 gets the value of 8/1?
I’m also attaching the PBIX file for the reference as well as providing a link below where a post has been created by one of our expert member @Greg. He has covered all the aspects about how one can rectify their incorrect totals.
You can furthermore, trim down your measure by eliminating the variables which are not required. Below is the alternative measure provided for the reference -
Measure 1 =
VAR Calc = ADDCOLUMNS(
VALUES( Dates[Date] ),
"@OL",
IF( ISBLANK( [OL RE] ) ,
BLANK() ,
CALCULATE( [OL RE after 12] , PREVIOUSDAY( Dates[Date] ) ) ) )
VAR Result = SUMX( Calc , [@OL] )
RETURN
Result
Hoping you find this useful and meets your requirements that you’ve been looking for.
Thanks, but I think that the PREVIOUSDAY does not do the job.
When the next day is without data, the number is not there anymore.
You can see on the screen below that the number “1” is not present in your measure whereas it is present in the original measures.
Can you please think of any other idea? Thanks!
I will try to explain:
OL RE - volume received on the selected day
OL RE after 12 - volume received on the selected day after 12 (midday)
Volume which is received after 12 should be moved to the next working day.
Would that help?