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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
guruprasathb
Regular Visitor

Calculate Number of Employees irrespective of filtered selection

Dear Power BI Experts,

 

Here is my scenario and I need valuable inputs.

 

Scenario:

1. I have a dataset which contains data from 1-1-2015 to till date.

2. I have a date filter on my dashboard (Slicer) - Which is DimDate Dataset

3. If user selected 01-10-2017 as start date & 31-10-2017 as end date. Then

4. I need to show total number of records from 1-1-2015 to 01-10-2017 as one of the KPI. 

 

Since in my Power BI data model, dataset & time have a relationship on transaction date. Because of that KPI is displayed while calculating the number of rows from 01-10-2017. Is there any workaround?

 

Thanks in Advance.

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@guruprasathb,

 

You may add CROSSFILTER Function outside and set cross-filter direction to None.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-chuncz-msft, Sorry for the late reply. I think we are almost there but still need your expert advise.

 

Below are my scenario's.

1. Calculate the record count from 1-1-2015 to Start Date of the Slicer (i.e., 10-1-2017)

2. Calculate the record count from 1-1-2015 to End Date of the Slicer (i.e., 10-31-2017).

 

Below are the DAX I am using,

 

Start Count(M) =
    CALCULATE (DISTINCTCOUNT(EMPLOYEE[Employee Code]),CROSSFILTER(EMPLOYEE[Joining Date],DateDim[Date],None) )
 

Kindly let me know your inputs.

 

Thanks,

Guru

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.