SOLVED

SUMIFS with dates in table

%3CLINGO-SUB%20id%3D%22lingo-sub-2251094%22%20slang%3D%22en-US%22%3ESUMIFS%20with%20dates%20in%20table%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2251094%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3ECan%20anyone%20explain%20why%20the%20below%20formula%20yields%200%20as%20a%20result%20please%3F%20(I%20want%20the%20sum%20of%20all%20quantities%20of%20the%20last%20year.)%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22bartvana_0-1617380478490.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F269148iD71F5846435F4DF0%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22bartvana_0-1617380478490.png%22%20alt%3D%22bartvana_0-1617380478490.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2251094%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Frequent Contributor

Hello,

Can anyone explain why the below formula yields 0 as a result please? (I want the sum of all quantities of the last year.)

bartvana_0-1617380478490.png

 

4 Replies
best response confirmed by bartvana (Frequent Contributor)
Solution

@bartvana 

Please use "<="&[@date] instead of "<=[@date]", etc. Second one literally returns the text inside the quotes which definitely couldn't be found. 

Thank you, that definitely clears up one problem. I adapted accordingly, but I must still be making some stupid mistake because the value still remains zero although the sum shouldn't be:

bartvana_0-1617383300543.png

(edit: added the spreadsheet)

OK, got it myself, the type of the date column in the Power Query that makes the table was "text", when I changed it to "date" it worked.

@bartvana 

Yes, in general it's the best practice to define proper types returning the table to Excel sheet or to other source.