The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi All,
I am trying to create a measure to calculate what % of months that TOP2 surveys hit my target.
Here is my sample dataset.
Dept_Surveys
Dept | surveyID | Survey | MM-YY |
Marketing | 23412 | TOP2 | Nov-20 |
Marketing | 23413 | TOP2 | Nov-20 |
Marketing | 23414 | TOP2 | Nov-20 |
Marketing | 23415 | TOP2 | Nov-20 |
Marketing | 23416 | TOP2 | Nov-20 |
Marketing | 23417 | TOP2 | 20-Dec |
Marketing | 23418 | TOP2 | 20-Dec |
Marketing | 23419 | TOP2 | 20-Dec |
Marketing | 23420 | Bottom3 | 20-Dec |
Marketing | 23421 | Bottom3 | 20-Dec |
Marketing | 23422 | Bottom3 | 20-Dec |
Marketing | 23423 | Bottom3 | 20-Dec |
Marketing | 23424 | Bottom3 | 20-Dec |
Marketing | 23425 | Bottom3 | 20-Dec |
Marketing | 23426 | Bottom3 | 20-Dec |
Marketing | 23427 | TOP2 | Jan-21 |
Marketing | 23428 | TOP2 | Jan-21 |
Marketing | 23429 | TOP2 | Jan-21 |
Marketing | 23430 | TOP2 | Jan-21 |
Marketing | 23431 | TOP2 | Jan-21 |
Marketing | 23432 | TOP2 | Jan-21 |
Marketing | 23433 | Bottom3 | Jan-21 |
Marketing | 23434 | Bottom3 | Jan-21 |
My marketing got 100% TOP2 surveys in Nov-2020, 30% in Dec-2020, and 75% in Jan-2021
I have one more table which contains the actual targets for each department.
Dept_Targets
Dept | Target |
Marketing | 70 |
Sales | 60 |
IT | 55 |
Tech | 80 |
So here, my marketing dept achieved the target in Nov-2020 and Jan-2021,I need to calculate What % of months actually hit the target.
the measure should be like Div ( IF % of TOP2 surveys > 70 then distinct Distinctcount(MM-YY) / Distinctcount(MM-YY))
Thanks in Advance
Solved! Go to Solution.
Hi, @Sharma0815
Please check the below picture and the sample pbix file's link down below.
I am not sure if I understood your question correctly, but I tried to extend the sample and created the extended version like below.
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
Hi, @Sharma0815
Please check the below picture and the sample pbix file's link down below.
I am not sure if I understood your question correctly, but I tried to extend the sample and created the extended version like below.
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
User | Count |
---|---|
14 | |
11 | |
6 | |
6 | |
5 |
User | Count |
---|---|
28 | |
17 | |
11 | |
7 | |
5 |