margin percentage
1 TopicMargin Percent Last year by Date
Hello, I have a requirement to get Margin % for Last year (LY) when a Date for current year is selected as shown below. I cannot use Sameperiodlast year since we go off of fiscal calendar. I got it working using DAX below. However, i can't figure out why total on Margin % LY isnt working (highlighted Yellow). It just copies the value from last cell. Have spent several hours without luck. Any help will be greatly appreciated. Note - I have Date and LYDate in a Date Dimension table in the database. Margin % TY:= DIVIDE(Stats[MarginAmt TY],Stats[SaleAmt TY],1) Margin % LY Sub:= CALCULATE(Stats[Margin % TY],FILTER(ALL('Date'),'Date'[Date] = MAX('Date'[LYDate])))1.3KViews0likes3Comments