Forum Discussion

iNeed2BI's avatar
iNeed2BI
Regular Visitor
3 years ago

YTD Count Variable Tabel

Hello, 

Can you please help me with the below problem:

 

I have created a measure that calculates the YTD value of another measure, see below:

 

KPI %OVR = IF([KPI Total target]<>0,[Total Processed Tasks] / [KPI Total target]) --> Initial measure
_PYTD = CALCULATE([KPI %OVR],DATESYTD(cCalendar[Date])) --> YTD
 
Now what I want is to basically for each employee for which I am calculating these 2 measureas, to have a formula that counts how many months in a year, the employee excedeed the KPI target.
 
Basically I would like to count the numbers of 1 that I have created with this basic formula:
 
_ifPTYD = IF([_PYTD]>[KPI %OVR],1,0)

If it could be furthermore cascated to weekly level or even day level would be great ... 

I'm thinking it can be done with a Variable Tabel but I'm struggling to understand how it works.

Thank you!

2 Replies

  • Hi iNeed2BI ,

     

    What are [KPI Total target] and [Total Processed Tasks]? Are they columns or measures? Besides what does your source table look like?

    Sorry for that the information you have provided is not making the problem clear to me. Can you please share more details to help us clarify your scenario?

    Please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

     

    Refer to:

    How to provide sample data in the Power BI Forum

    How to Get Your Question Answered Quickly

     

    Best Regards,

    Jianbo Li

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • iNeed2BI's avatar
      iNeed2BI
      Regular Visitor

      Hello, [KPI Total target] and [Total Processed Tasks] are measures.

       

      I have also sent you the pbix file on private message because it might still contain some sensitive data.

       

      Thank you!