Forum Discussion
Calculated Column based on two tables
- 4 years ago
Hi, SK87
If you switch the variable date by slicer, then you should create a measure instead of a calculatted column to count the value. Calculated columns are unaffected by the value selected in the slicer.
You can create a measure like below and apply it to table visual.
Count = CALCULATE ( COUNTROWS ( 'Table' ), FILTER ( 'Table', 'Table'[Start Date] <= SELECTEDVALUE ( 'Calendar Date'[Date] ) && 'Table'[End Date] >= SELECTEDVALUE ( 'Calendar Date'[Date] ) ) )Best Regards,
Community Support Team _ Eason
Thanks amitchandak
But I need to calculate Count column which you have mentioned in measure as Table[Count]. I had shared above example after calculating in excel but how I can get same count in PBI using date 1 independent variable
Hi, SK87
If you switch the variable date by slicer, then you should create a measure instead of a calculatted column to count the value. Calculated columns are unaffected by the value selected in the slicer.
You can create a measure like below and apply it to table visual.
Count =
CALCULATE (
COUNTROWS ( 'Table' ),
FILTER (
'Table',
'Table'[Start Date] <= SELECTEDVALUE ( 'Calendar Date'[Date] )
&& 'Table'[End Date] >= SELECTEDVALUE ( 'Calendar Date'[Date] )
)
)
Best Regards,
Community Support Team _ Eason