Posts: 1
Registered: ‎02-16-2017

Lab 2 Exercise 2 Calculated Measures Problems

I am having no luck with calculating the total sales. I have checked my relationships and have a "Many to One" Cardinality between my Date column on my Sales table and the Date column on my Date table with a Cross filter Direction of "Both." Can someone lead me in the right direction about where I am going wrong? Up until thus far I have completed all the steps in the lab correctly. I appreciate any help! 


Posts: 93
Registered: ‎03-10-2016

Re: Lab 2 Exercise 2 Calculated Measures Problems

Could you provide more details about calculating the total sales?

Frequent Visitor
Posts: 5
Registered: ‎03-13-2017

Re: Lab 2 Exercise 2 Calculated Measures Problems

Problem 1.  The second "if you're stuck" example does not work for me.  The Total Units example seems to work, but the second example does not:   


LY Total Units = CALCULATE([Total Units],SAMEPERIODLASTYEAR('Date'[Date])

Error:  Column 'Total Units' cannot be found or may not be used in this expression.


Generalizing this example to Revenue/Sales gives the same error.  So, I'm not sure how to get LY Sales.  


"Total Units" and "Total Sales" exist, but are not found for some reason.


Problem 2.  Is the question worded correctly?  "Total Sales:  calculates the total sales"  but under "Sales Var" (third part), the question asks for the difference between sales this year and  last year sales.  Where in the "Total Sales" solution does one specify the total is for just this year and not all data?  Is the "last year" implied somehow?  If one wanted to compare the last two years, with years 3 and 4 back, how would that be done?