Forum Discussion
Anonymous
1 year agoNot applicable
Date Slicer
Hello everyone, I have a case like this: I have a 2 tables: - Table 1: named "Dile_fact" Name Date_exam Date_release Units Ava 01/15/24 11/01/24 Meter (m) Leo 02/20/24 11/15/2...
Kedar_Pande
1 year agoSuper User
Anonymous
Create a new table for Date Types:
DateType = DATATABLE("Date Type", STRING, {{"Date_exam"}, {"Date_release"}})Create a measure to filter based on selected values
Filtered Result =
VAR SelectedDateType = SELECTEDVALUE(DateType[Date Type])
VAR SelectedDate = SELECTEDVALUE(dim_date[Date])
RETURN
IF(
SelectedDateType = "Date_exam",
CALCULATE(
COUNTROWS(Dile_fact),
Dile_fact[Date_exam] = SelectedDate
),
IF(
SelectedDateType = "Date_release",
CALCULATE(
COUNTROWS(Dile_fact),
Dile_fact[Date_release] = SelectedDate
)
)
)
Use the Filtered Result measure in the table to see the filtered count based on the slicer selections.
πIf this helped, a Kudos π or Solution mark would be great! π
Cheers,
Kedar
Connect on LinkedIn