Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
jostnachs
Helper IV
Helper IV

Active as of

Hi all...

 

I have a requirement where i have to have 4 date selections on one page

1. Active today (Shows all metrics which are active today)

2. Active as of(Shows all metrics which are active as of selected date)

3. effective Range (shows all metrics dependent on effective date range selection)

4. Expiration Range (shows all metrics dependent on expiration date rage selection)

 

I have efective range & expiration range as two date columns in my fact table.

I understood how to bring active today (

= IF(TODAY()>=V_DimPolicy[EffectiveDate]&& TODAY()<=V_DimPolicy[ExpirationDate],1,0)

But how do i do active as of....

 

the idea is to bring client count for all the 4 conditions based on the date selection.

how do I do that arrangement also the measures

jostnachs_0-1745951799883.png

 

 

Appreciate any help here 

1 ACCEPTED SOLUTION
anilelmastasi
Super User
Super User

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.

 

 

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

Hi @jostnachs ,

As we have not received a response from you yet, I would like to confirm whether you have successfully resolved the issue or if you require further assistance. If the issue has been resolved, please mark the helpful reply as a "solution" to indicate that the question has been answered and to assist others in the community.
Thank you for your cooperation. Have a great day.

Anonymous
Not applicable

Hi @jostnachs ,
Has the issue been resolved on your end? If so, please share your solution and mark it as "Accept as Solution." This will assist others in the community who are dealing with similar problems and help them find a solution more quickly.
Thank you.

Anonymous
Not applicable

Hi @jostnachs ,
I wanted to check in on your situation regarding the issue. Have you resolved it? If you have, please consider marking the reply that helped you or sharing your solution. It would be greatly appreciated by others in the community who may have the same question.
Thank you.

anilelmastasi
Super User
Super User

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.

 

 

Great!

But in this case i would have to use three measures/ three views on one page right!

like one view or each bookmark

Anonymous
Not applicable

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.