max(ifelse(CANCELLED = 'N' AND SHIFTDATE >= addDateTime(-7,'DD',${pDate}) AND SHIFTDATE <= ${pDate},{ORDER_WITHOUT_TAX_AMOUNT},0), [Branch,{ORDER_NUMBER},SHIFTDATE]) )
My data is Invoice Headers joined with Invoice line items table. so the invoice/order totals are being repeated by how many line items there are after the join. this is why I’m taking the Max over Branch, Order_number, and ShiftDate as the unique invoice identifiers.
My question is how can I calculate percentage of total without using the built-in function percentOfTotal() and is there a way to make a measure only appear under “Total” and not under every column in the dimension value?
Here is what I was trying to achieve, this was done using percentageOfTotal():