Hi. I've tried to attached an small PBIx file but it's not accepted.
I've created the below DAX which I've thrown in a slicer and it works fine. All the options are there. Then, for the 'Custom' Type I've created another DAX as below 'Data Slicer Filter' which I have added to the date slicer to filter '1' so that the dates slicer is actionable only when I tick on the 'Custom' type option.
However, as you can see on the attached when I tick anything but Custom, both dates in between should be grayed out but only the right side of the slicer is greyed out and the other can be amended which is not the desired result.
Also, in order to only display days up to today I have created this DAX but it doesn't do anything;
Is Before Today = IF(ALL('Semantic FactCommunications'[LetterSentDate]) <= TODAY(), TRUE, FALSE )
Thank you for your time I really appreciate it
DATES SLICER DAX;
Date Slicer Filter = IF(
SELECTEDVALUE('Date Periods'[Type]) = "Custom", 1, 0)
Date Periods =
UNION(
ADDCOLUMNS(
CALENDAR(MIN('Semantic FactCommunications'[LetterSentDate]),MAX('Semantic FactCommunications'[LetterSentDate])), "Type", "Custom",
"Order", 1),
ADDCOLUMNS(
CALENDAR(MIN('Semantic FactCommunications'[LetterSentDate]),MAX('Semantic FactCommunications'[LetterSentDate])), "Type", "All Time",
"Order", 2),
ADDCOLUMNS(
DATESMTD('Semantic FactCommunications'[LetterSentDate]), "Type", "MTD",
"Order", 3),
ADDCOLUMNS(
PREVIOUSMONTH('Semantic FactCommunications'[LetterSentDate]), "Type", "Previous Month",
"Order", 4),
ADDCOLUMNS(
DATESYTD('Semantic FactCommunications'[LetterSentDate]), "Type", "YTD",
"Order", 5),
ADDCOLUMNS(
PREVIOUSYEAR(DATESYTD('Semantic FactCommunications'[LetterSentDate])), "Type", "Last Year",
"Order", 6),
ADDCOLUMNS(
DATESQTD('Semantic FactCommunications'[LetterSentDate]), "Type", "QTD",
"Order", 7),
ADDCOLUMNS(
PREVIOUSQUARTER('Semantic FactCommunications'[LetterSentDate]), "Type", "Previous QTD",
"Order", 8))
I've created the below DAX which I've thrown in a slicer and it works fine. All the options are there. Then, for the 'Custom' Type I've created another DAX as below 'Data Slicer Filter' which I have added to the date slicer to filter '1' so that the dates slicer is actionable only when I tick on the 'Custom' type option.
However, as you can see on the attached when I tick anything but Custom, both dates in between should be grayed out but only the right side of the slicer is greyed out and the other can be amended which is not the desired result.
Also, in order to only display days up to today I have created this DAX but it doesn't do anything;
Is Before Today = IF(ALL('Semantic FactCommunications'[LetterSentDate]) <= TODAY(), TRUE, FALSE )
Thank you for your time I really appreciate it
DATES SLICER DAX;
Date Slicer Filter = IF(
SELECTEDVALUE('Date Periods'[Type]) = "Custom", 1, 0)
Date Periods =
UNION(
ADDCOLUMNS(
CALENDAR(MIN('Semantic FactCommunications'[LetterSentDate]),MAX('Semantic FactCommunications'[LetterSentDate])), "Type", "Custom",
"Order", 1),
ADDCOLUMNS(
CALENDAR(MIN('Semantic FactCommunications'[LetterSentDate]),MAX('Semantic FactCommunications'[LetterSentDate])), "Type", "All Time",
"Order", 2),
ADDCOLUMNS(
DATESMTD('Semantic FactCommunications'[LetterSentDate]), "Type", "MTD",
"Order", 3),
ADDCOLUMNS(
PREVIOUSMONTH('Semantic FactCommunications'[LetterSentDate]), "Type", "Previous Month",
"Order", 4),
ADDCOLUMNS(
DATESYTD('Semantic FactCommunications'[LetterSentDate]), "Type", "YTD",
"Order", 5),
ADDCOLUMNS(
PREVIOUSYEAR(DATESYTD('Semantic FactCommunications'[LetterSentDate])), "Type", "Last Year",
"Order", 6),
ADDCOLUMNS(
DATESQTD('Semantic FactCommunications'[LetterSentDate]), "Type", "QTD",
"Order", 7),
ADDCOLUMNS(
PREVIOUSQUARTER('Semantic FactCommunications'[LetterSentDate]), "Type", "Previous QTD",
"Order", 8))