Forum Discussion
Active as of
- 1 year ago
Hello jostnachs ,
For Active Today:
Client Count Active Today =
CALCULATE(
DISTINCTCOUNT(V_DimPolicy[ClientID]),
V_DimPolicy[ActiveTodayFlag] = 1
)For Active As Of:
-Create a disconnected date table (e.g., Date_AsOf)
You can generate this using Power BI's "Enter Data" or use a date table and remove relationships.-Create a slicer using Date_AsOf[Date].
Create the measure:
Client Count Active As Of =
VAR _selectedDate = SELECTEDVALUE(Date_AsOf[Date])
RETURN
CALCULATE(
DISTINCTCOUNT(V_DimPolicy[ClientID]),
V_DimPolicy[EffectiveDate] <= _selectedDate &&
V_DimPolicy[ExpirationDate] >= _selectedDate
)For Effective Range Selection:
Use your existing EffectiveDate column with a slicer in between mode.
Client Count Effective Range =
CALCULATE(
DISTINCTCOUNT(V_DimPolicy[ClientID])
// EffectiveDate slicer filters this automatically
)For Expiration Range Selection:
Same as above, use ExpirationDate in a slicer.
Client Count Expiration Range =
CALCULATE(
DISTINCTCOUNT(V_DimPolicy[ClientID])
// ExpirationDate slicer filters this automatically
)Make sure:
Your Date_AsOf slicer has no relationship to the fact table.
The other slicers (EffectiveDate, ExpirationDate) do filter the fact table directly.
If this solved your issue, please mark it as the accepted solution. ā
Hi jostnachs ,
Thank you anilelmastasi for the helpful response!
Yes,If we go with separate slicers and measures for each logic, you would typically need separate visuals or use bookmarks to toggle between views.
Hope this resolve your query.If so, considr accepting it as solution.
Regards,
Pallavi.
Hello Everyone.... circling back on this.... I am still unable to get a proper solution to this issue. Thoough i am using this measures stated above, its making the report really slow as I have some complax calculations. how can I work this out