Forum Discussion
DAX - Column content based on slicer selection
- 8 years ago
Hi Anonymous,
Did you had a measure or a calculated column?
I'm assuming that since your data is always the same in the sample you showned that you created a calculated column, this will give you the maximum value of the date column in your data.
Below you can see the same measure as you have but in a calculated colum (COLUMN_REF) and in a measure (MEASURE_REF) the only one that changes accordingly to the slicer is the measure.
You need to change your formula to a measure instead of the column.
Regards,
MFelix
Hi MFelix,
First off, thank you for responding and helping me.
I followed your instruction to the letter but unfortunately the filter fails to display the correct value and more importantly, the calculated measure returns a date that doesn't exist in any of the fields.
Unfortunately I am not able to share the PBI file due to sensitive data but let me know if there is anything I can provide that could help with troubleshooting.
Thanks,
OZ
Can you share the measure you created?
Regards,
MFelix
- Anonymous8 years agoNot applicable
Here it is:
DATE_REFERENCE_CREATION =
SWITCH(
TRUE(),
MAX('Slicer Table'[CREATION DATE])="REQUISITION",MAX('Receipts & Overdues'[CREATION_DATE_REQ]),
MAX('Slicer Table'[CREATION DATE])="PURCHASE ORDER", MAX('Receipts & Overdues'[CREATION_DATE_PO]),
MAX ('Receipts & Overdues'[CREATION_DATE_REQ])
)- MFelix8 years ago
Super User
Hi Anonymous,
Do you have any Calendar Table or something similar connecting to you data table?
Regards,
MFelix
- Anonymous8 years agoNot applicable
No nothing at all, only one SQL and its table loaded in the model