Forum Discussion

LS1700's avatar
LS1700
Resolver I
9 years ago
Solved

Running total and null values

Hello,   I have some different tables with sales and I am building a new table with a coulmn where I entered the days of the month (1-31). I managed to add measures to this table with the units so...
  • LS1700's avatar
    LS1700
    9 years ago

    I found the solution!

     

    Wrong: MTD Invoiced = CALCULATE(SUM(Invoicing[Qty]),FILTER(ALLSELECTED(Invoicing),Invoicing[Day]<=MAX(Invoicing[Day])))

     

    Correct: MTD Invoiced = CALCULATE([Invoiced Qty],filter(ALLSELECTED('Table for Chart'),'Table for Chart'[Day Index]<=max('Table for Chart'[Day Index])))

     

    As you can see, the second is referencedto the new table I created. now it show each time the MTD.