Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Thanks idealy this shoud work but it is giving bank values with or without selecting month
when SelectedMonth used in return i got appropriate selected month but when used
CALCULATE (COUNTAX (FILTER (Salary,Salary[Value] <> 0 && Salary[Month] = SelectedMonth),'Salary'[Particular]),'Date'[Month] = SelectedMonth)
not getting headcount of any month ,not sure why
i try selected value function, max month is measure which returns the latest month of salary table
this is working fine for now
Hello @Shivkanyabyale ,
Please use the below revised code...
Headcount =
VAR SelectedMonth =
IF (
ISFILTERED('Date'[Month]), -- Check if a month is selected
MAX('Date'[Month]), -- Use selected month
CALCULATE(MAX('Date'[Month]), ALL('Date')) -- Use the latest month when no filter is applied
)
RETURN
CALCULATE (COUNTAX (FILTER (Salary,Salary[Value] <> 0 && Salary[Month] = SelectedMonth),'Salary'[Particular]),'Date'[Month] = SelectedMonth)
If you find this helpful , please mark it as solution and Your Kudos/Likes are much appreciated!
Thank You
Dharmendar S
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.