Forum Discussion

FurqanbsBSL's avatar
FurqanbsBSL
New Member
1 year ago

Measure Total is Blank

Hi All, 

 

I have come accross a very strange scenario where my measure total is blank and i am unable to solve this. Narrative as below

 

my excel data is 3 columns only A) Dates - one month interval B) Total Units/Sales whatever.

I am trying to achieve a running total curve over the duration which i was able to without any issues.

The measure used for above is 

calculate([sum of sales],
Filter(all(Sheet1[Date]),Sheet1[Date]<=Max(Sheet1[Date]))).
 
The Curve however is one colour , the excel data is generated of a specialist software and past a certain month its forecast sales and prior to a certain date it is actual sales . 
 
So the work around I did was was created two measure for actual and forecast , used the same measure DAX as above , but added if statement to it as below. In matrix view this ceated two columns where in actuals the rows would go blank after my " Data date " and in forecast the opposite happens. This gets me the desired results however the forecast column the Totals are always Blank . Actual column works fine. Issue is when i visualise this in a line chart with dates on x axis , using the values works fine for both but if i want to see it % of GT , actuals is okay but forecast is blank because the total is blank. 
 
I am unable to resolve this as exactly same DAX works for one but wont work for forecast! help
 
Forecast:
if(SELECTEDVALUE(Sheet1[Date])>=[datadate],calculate([Sales],
Filter(all(Sheet1[Date]),Sheet1[Date]<=Max(Sheet1[Date]))),blank())
 
Actuals:
if(SELECTEDVALUE(Sheet1[Date])<[datadate],calculate([Sales],
Filter(all(Sheet1[Date]),Sheet1[Date]<=Max(Sheet1[Date]))),blank())

3 Replies

    • FurqanbsBSL's avatar
      FurqanbsBSL
      New Member

      I think I debugged the issue - This was to do with the Selected value. Disregard thank!

      • Wilson_'s avatar
        Wilson_
        Memorable Member

        Perfect, thanks for the update. Can you please share your fix here, in case anybody with the same issue comes across your post? 🙂