Forum Discussion

robertosangi's avatar
robertosangi
Helper I
4 years ago
Solved

COUNT and difference

I want to reproduce this situation in PowerBi.   I have three different tables named: Wn-1, Wn, Person   I wanted to know how much work did each person inside the table Person between the two wee...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi robertosangi ,

    I created a sample pbix file(see attachment) for you, please check whether that is what you want.

    1. Create relationships between Wn, Wn-1 and Person table base on the field Person just as below screenshot

    2. Create two measures as below to get the count of cases in Wn and Wn-1

    Wn = COUNT('Wn'[#Case])
    Wn-1 = COUNT('Wn-1'[#Case])

    3. Create a measure as below to get the difference between Wn and Wn-1

    Difference = [Wn]-[Wn-1]

    4. Create a table visual as below screenshot

    Best Regards