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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
omkarsawant30
Frequent Visitor

Calendar Date filter not working as expected, how to resolve this issue

Context -> I have 2 Tables - HR Talk Forms and User. HR Talk Forms contain one row each for every HR Talk taken place between Employee and HR POC. User table consists of data of all active employees working in the company. 

 

Requirement -> Create 100% stacked bar charts to analyse the completion % of HR talk forms by different fields like Department, Country, etc. User should be able to filter Year (Eg. 2023 or 2024) and Half year (Eg. H1 or H2) to see the results.

 

Situation - > Since HR Talk Forms table contains data of only completed HR talks, its date field cannot be used to filter data for the requirement, so i created a Calendar table, so that i can have a date field , but when i apply it, it shows 100% for completions for all Departments or Countries, which is incorrect. 

Please see the attached data model and chart designed. Kindly help me on this issue.
HR Talks model.png
HR Talks chart issue.png

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@omkarsawant30 , You need a table to give total employees by department/date and use that measure to create a % measure and use that in clustered bar visual

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@omkarsawant30 , You need a table to give total employees by department/date and use that measure to create a % measure and use that in clustered bar visual

Thanks @amitchandak ! Based on the reply , i created a new table by mapping all dates of year 2023 and 2024 with all Employee ID, department, country and Talent coordinator. The solution has worked, using distinct count of Employee ID in the charts.

DateEmployeeMapping =
CROSSJOIN(
    SUMMARIZE(
        FILTER('User', 'User'[EmployeeStatus] = "Active"),
        'User'[UserId], 'User'[Department], 'User'[TalentCoordinator], 'User'[Country]
    ),
    GENERATESERIES(DATE(2023, 1, 1), DATE(2024, 12, 31), 1)
)
v-shex-msft
Community Support
Community Support

Hi @omkarsawant30 ,

Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

@v-shex-msft Sure but i dont see any option in the reply section to attach excel files. Kindly guide.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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