cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mrslyfox Regular Visitor
Regular Visitor

TOTALMTD empty days

Hello,

 

Have a folowing formula

MTD Sales:=TOTALMTD(SUM(F_Delivery_Note[DELNL_TotalGrossSqm]),D_Date[LINK_Date])

 

Which gives me almost expected results.

Trouble only with last marked by red days. Result for those days should blank.

TOTALMTD.png

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: TOTALMTD empty days

Hey

 

your formula should look like this

MTD Sales:=IF(
 NOT(
  ISBLANK(
   SUM(F_Delivery_Note[DELNL_TotalGrossSqm])))
   ,TOTALMTD(SUM(F_Delivery_Note[DELNL_TotalGrossSqm]),D_Date[LINK_Date])
   ,BLANK()
  )

 

 

Hamburg - Germany
If I answer you question, please mark my post as solution, this will also help others.
Proud to be a Datanaut!
3 REPLIES 3
Highlighted
Super User
Super User

Re: TOTALMTD empty days

A quick solution would be to put your calculation into an if statement, that checks if your measure is not null like this

 

IF(NOT(ISBLANK(sum of your measure)), your calculation, BLANK())

 

You have to consider that this formula also surpresses the calculation for days where there is no data, for a business reason.

Hamburg - Germany
If I answer you question, please mark my post as solution, this will also help others.
Proud to be a Datanaut!
mrslyfox Regular Visitor
Regular Visitor

Re: TOTALMTD empty days

Hello @TomMartens

 

Result of

MTD Sales:=IF(NOT(ISBLANK(TOTALMTD(SUM(F_Delivery_Note[DELNL_TotalGrossSqm]),D_Date[LINK_Date]))),TOTALMTD(SUM(F_Delivery_Note[DELNL_TotalGrossSqm]),D_Date[LINK_Date]),BLANK())

 

returned the same result as it was from the beginning.

Super User
Super User

Re: TOTALMTD empty days

Hey

 

your formula should look like this

MTD Sales:=IF(
 NOT(
  ISBLANK(
   SUM(F_Delivery_Note[DELNL_TotalGrossSqm])))
   ,TOTALMTD(SUM(F_Delivery_Note[DELNL_TotalGrossSqm]),D_Date[LINK_Date])
   ,BLANK()
  )

 

 

Hamburg - Germany
If I answer you question, please mark my post as solution, this will also help others.
Proud to be a Datanaut!