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
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
Community Champion
Community Champion

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
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.