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
nrungta
Frequent Visitor

I want one column to be defined by two other columns

I have one column as EmployeeId, and another column as Month, and another as TargetAchievers, 
TargetAchievers value is 1 if Achieved and 0 if not.
Now the EmployeeId is unique but it repeats monthly.

I want to know how many employees achieved every month successively.
Please help, also I hope this defines my issue completely

7 REPLIES 7
v-diye-msft
Community Support
Community Support

Hi @nrungta 

 

Let me know if you'd like to get below results:

Measure = CALCULATE(DISTINCTCOUNT('Table'[EmployeeID]),FILTER(ALL('Table'),[TargetAchievers]=1),VALUES('Table'[Month]))

003.PNG

Pbix attached.

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

This is not the solution @v-diye-msft 

Taking your version, If you see     

A is TargetAchievers = 1 time

B is TargetAchievers = 2 times

C is TargetAchievers = 2 times

D is TargetAchievers = 3 times

 

Now as you can see B and C both Achieved 2 times.
The solution I require is where I can click on this number and my whole visualisation drills down on the basis of this, i.e., show drilled data of only B and C.

 

 

nrungta
Frequent Visitor

Now the Maximum any EmployeeID can get is total 2, then 1 then 0.
There are 2 employees who have got 2, (meaning they have achieved the target successfully in both months).

How do I Visualise my whole other data, just on this number 2, i.e, all other visualisations should drill-down to only these two Employees.


@AlB @Ashish_Mathur 

2019-10-05 23_27_40-Untitled - Power BI Desktop.png2019-10-05 23_27_18-Untitled - Power BI Desktop.png

Ashish_Mathur
Super User
Super User

Hi,

Share some data and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

@nrungta 

Do show data and an example and everything will be easier and quicker. If you want the number of employees per year:

1. Place year in a table visual

2. Place this measure in the visual (it assumes you want a 1 in all 12 months for the employee)

 

Measure =
SUMX (
    DISTINCT ( Table1[ID] ),
    INT ( CALCULATE ( SUM ( Table1[TargetAchievers] ) ) = 12 )
)

 

Please mark the question solved when done and consider giving kudos if posts are helpful.

 

Cheers  Datanaut

AlB
Super User
Super User

Hi @nrungta 

Try this

1. Place Month in the rows of a table visual

2. Place this measure in the visual:

 

Measure = SUM( Table1[TargetAchievers] )

 

Please mark the question solved when done and consider giving kudos if posts are helpful.

Cheers  Datanaut

nrungta
Frequent Visitor

Hi @AlB ,
This is not solving my issue. I already have a table for TargetAchievers whose sum will give the same result.
I want to know how many EmployeeIDs achieved the target successively every month,
Suppose in a year it can go Max till 12 only.
How do I drill down all my visuals to the number 12.

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.