Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi All,
I am trying to track the occurance of a particular status in my data set over time (per unique ID).
I have been reading a few pages and am worried it is not possible to do what I am trying without query editor.
I am trying to generate a calculated column based on the previous row of my data, but this also requires a custom sort using two level column sort (apparently not possible).
Is there another way I can do this. This is how I build it in excel.....
1. Sort by;
a. ID - to group the leases together
b. Report date - to get their status over time (number of reports)
2. Use countif and anested IF statement to check
a. For the same property,
b. has the status changed,
c. if yes, has it changed to 'close out' (the status I am trying to count)
d. if yes, count as 1.
The results are below, in this snapshot, there are two properties, both that have progressed to closeout over the reporting period.
When I apply this to my data set I can see how many properties closedout over the period.
Is there a way I can do both of these steps in power BI?
Your help, ideas, suggestions would be greatly appreciated!
Solved! Go to Solution.
Hi SianM,
Based on my analysis, in DAX, you can create a calculate column and use formula like this pattern:
Count Closeout = IF ( CALCULATE ( COUNTROWS ( Table[Milestones Status] ), FILTER ( Table, Table[Lease ID] = EARLIER ( Table[Lease ID] ) && Table[Milestones Status] <> EARLIER ( Table[Milestones Status] ) ) ) <> 0, 1, 0 )
Regards,
Jimmy Tao
User | Count |
---|---|
125 | |
106 | |
99 | |
63 | |
62 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |