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
Can you share the measure you created?
Regards,
MFelix
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
- MFelix8 years ago
Super User
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