Excel Power Pivot - data model calculation

%3CLINGO-SUB%20id%3D%22lingo-sub-1383236%22%20slang%3D%22en-US%22%3EExcel%20Power%20Pivot%20-%20data%20model%20calculation%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1383236%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20a%20power%20pivot%20to%20with%20daily%20sales%20tables%20(one%20table%20with%20sales%20this%20year%20and%20one%20with%20sales%20last%20year)%20%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eand%20date%20reference%20table.%20The%20user%20inputs%20the%20date%20and%20populates%20on%20the%20data%20model.%20Then%2C%20I%20have%20a%20lookup%20to%20show%20gross%20sales%20if%20the%20date%20is%20less%20or%20equal%20to%20the%20date%20on%20date%20referenc%20table.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESee%20screenshots%20for%20more%20info.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3EI%20have%20this%20Data%20Reference%20table%20on%20my%20PowerPivot%20where%20I%20have%20a%20calculation%20to%20show%20me%20the%20same%20date%20(user%20entered%20and%20populate%20Date%20-%201st%20column%20below)%20last%20year%20which%20is%20column%20below%20Date%20LY.%20%26nbsp%3B%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Picture1.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F190993i9470AC1D5434D1C8%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22Picture1.png%22%20alt%3D%22Picture1.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThen%2C%20I%20have%20a%20table%20for%20sales%20last%20year%20where%20I%20use%20that%20Date%20LY%20to%20show%20gross%20sales%20YTD.%20See%20below%20formula%20where%20it%20should%20find%20the%20Docdate%20and%20compare%20if%20less%20or%20equal%20then%20show%20the%20gross%20sales%2C%20else%200.%20It%20shows%20only%20the%20lines%20for%20the%20month%20but%20it%20will%20not%20include%20anything%20prior%20(like%20January%20thru%20May).%20%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Picture2.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F190995i1E30AA199A58925D%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22Picture2.png%22%20alt%3D%22Picture2.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CDIV%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%3CP%3ESame%20thing%20happens%20with%20comparing%20date%20to%20sales%20this%20year.%20Not%20sure%20if%20something%20missing%20on%20my%20RELATED%20(Date%20reference)%20formula.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1383236%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
Occasional Visitor

I have a power pivot to with daily sales tables (one table with sales this year and one with sales last year)  and date reference table. The user inputs the date and populates on the data model. Then, I have a lookup to show gross sales if the date is less or equal to the date on date referenc table.

 

See screenshots for more info.

 

 I have this Data Reference table on my PowerPivot where I have a calculation to show me the same date (user entered and populate Date - 1st column below) last year which is column below Date LY.  Picture1.png

 

Then, I have a table for sales last year where I use that Date LY to show gross sales YTD. See below formula where it should find the Docdate and compare if less or equal then show the gross sales, else 0. It shows only the lines for the month but it will not include anything prior (like January thru May).  

Picture2.png

 

Same thing happens with comparing date to sales this year. Not sure if something missing on my RELATED (Date reference) formula.

 

 

 

0 Replies