Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I am using Power Query and Power Pivot to try and create a living report that can be edited. I have one column with a unique ID, another with the date the entry was made, and another with the follow up date. I want to write a formula that essentially is a countif funtion. I want it to count the number of rows that match the ID of that row and have an entry date equal to or greater than the follow up date. I have tried numerous formulas with Calculate and Countrows but I can't figure out how to get this to come out. Any help would be appreciated.
Solved! Go to Solution.
Hi @asd2525
Create a new column
new column = VAR Max_each_id = CALCULATE ( MAX ( 'Table'[Entry Date] ), ALLEXCEPT ( 'Table', 'Table'[ID] ) ) RETURN IF ( Max_each_id >= [Followup Date], 1, 0 )
I am dealing with HIPPA data so I can't share but this is an example of what I want to be able to do with powerpivot.
The equation that I would use in a regular table would be =IF(COUNTIFS($D$2:$D$5,$D2,$A$2:$A$5,">="&$E2),"Yes","No")
I can't figure out how to get the same results with PowerPivot
Date | Name | DOB | ID | Followup Date | Followup Occurred? |
8/18/2019 | John Doe | 1/1/1901 | John Doe367 | 9/18/2019 | Yes |
8/25/2019 | Jane Doe | 2/2/1902 | Jane Doe764 | 9/25/2019 | No |
9/3/2019 | John Smith | 3/3/1903 | John Smith1158 | 10/3/2019 | No |
9/18/2019 | John Doe | 1/1/1901 | John Doe367 | 10/18/2019 | No |
Hi @asd2525
Create a new column
new column = VAR Max_each_id = CALCULATE ( MAX ( 'Table'[Entry Date] ), ALLEXCEPT ( 'Table', 'Table'[ID] ) ) RETURN IF ( Max_each_id >= [Followup Date], 1, 0 )
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.