Forum Discussion

prashantg364's avatar
prashantg364
Helper II
2 years ago

DAX

I have a data table below where we can see employees worked under which scope on a particular date.

I want to create an output table where I would like to see distinct employees worked under which scope at the week level.

EmployeescopeDateWK
alphaSST01-Jan-231
alphaCVT02-Jan-231
alphaSST03-Jan-231
betaCLT04-Jan-231
betaCLT05-Jan-231
betaCLT06-Jan-231
gamaCVT07-Jan-231
gamaCVT08-Jan-232
gamaCVT09-Jan-232
alphaSST10-Jan-232
alphaSST11-Jan-232
alphaSST12-Jan-232
betaSST13-Jan-232
betaSST14-Jan-232
betaSST15-Jan-233
gamaCLT16-Jan-233
gamaCLT17-Jan-233
gamaCLT18-Jan-233
alphaSST19-Jan-233
alphaCVT20-Jan-233
alphaSST21-Jan-233
betaSST22-Jan-234
betaCVT23-Jan-234
betaCVT24-Jan-234
gamaSST25-Jan-234
gamaCVT26-Jan-234
gamaSST27-Jan-234

 

required Output table

 

ScopeSSTCVTCLTSST+CVT
Wk10111
Wk22100
Wk31011
Wk40002

3 Replies

  • Hi,

    I am not sure if I understood your question correctly, but I tried to create a sample pbix file like below.

    Please check the below picture and the attached pbix file if it suits your requirement.

    All measures are in the attached pbix file.

     

     

     

     

     

     

  • hI prashantg364 ,

     

    Can you please double check? Your sample data does not match  with your expected result.  For example, there are supposed to be 1, 2, 2 and 2 for each week under SST but yours shows differently.  Also, it is unclear whether the output is in a visual or how the data should be loaded into the model.

     

    Anyways, the attached pbix  might be what you're looking for.

    • prashantg364's avatar
      prashantg364
      Helper II

      The output is not correct.

      Let me re-phrase my question.
      I have data with employee's name & the work done on a particular date. Now I want to summarize my table to know how many unique employees worked in one scope & how many unique employees worked in multiple scopes.