Forum Discussion

Thales's avatar
Thales
New Member
4 years ago
Solved

Incorrect Totals in Measure

Dear All,

 

I have a measure that calculates an offset month amount and calculated the Total_Value with the offseted amount. The offset months show the intended values but I have noticed that the report displays incorrect totals even I used HASNOFILTER. Any ideas on how to fix it?

Any help would be very much appreciated.

 

TOTAL_VALUE = 
//Gets offset month delay from slicer
var MINDATE = SELECTEDVALUE(Delay_Month[Delay_Month])

var NEWOFFSET = MAX(Date_Map[Offset_Month]) - MINDATE


var ProdValue  =  IF(HASONEFILTER(Date_Map[Offset_Month]),CALCULATE(SUM(Combined_All[Value]), Date_Map[Offset_Month] == NEWOFFSET) , CALCULATE(SUM(Combined_All[Value])))


RETURN

IF(HASONEVALUE(Date_Map[Offset_Month]), ProdValue, 0)