Hi,
I authored a calculated column to get the ages of customers as at the time orders were made. My DAX code is:
Age at the time of Orders = DATEDIFF ( RELATED(Customer[DOB]), Orders[Order Date],YEAR )
But when I place that on the tile, against the customers I got different results. Wonder what I am doing wrong here.
My requirement is to display on the visual, details of customers who made orders between the ages of 15 and 20 inclusive. To fulfil this requirement, I placed the column on the filter pane and applied conditions. Is there a way I could write a measure for this without having to use the filter pane. And the filter pane did not yield the expected result:
As seen in the above image, the age column should not be greater than 20 and should not be lesser than 15.
I need help. How do I author a decent query to meet these need?
My file is attached.
Thank you.
Super Store Model.pbix (848.6 KB)