Hello
I need help converting excel logic to Power Pivot formula. I have a list of supplier names (each have a unique ID, a supplier name and a status). The problem is that a given supplier can actually have multiple records ie - same name but different status record and different ID. Here's an example:
1 FredsFlowers active
2 JohnsStationery inactive
3 FredFlowers inactive
4 SuesBakery active
5 JohnsStationery inactive
I need to flag the 'current' record for a given supplier. In this case it would be ID = 1,2 and 4
The excel logic is:
1. if there is one active record, it's the current record.
2. if there is an active record and multiple inactive records, the active record is the current record.
3. if there is only one record and it's inactive, it's the current record.
4. if there are multiple inactive records, pick the first record in the list to be the current record.
What is the best way to do this? In Power Query (I don't know M) or Power Pivot? If Power Pivot, how do I implement the logic (I tried a calculated column but could only get the formula to work for point 1 above).
Thanks
I need help converting excel logic to Power Pivot formula. I have a list of supplier names (each have a unique ID, a supplier name and a status). The problem is that a given supplier can actually have multiple records ie - same name but different status record and different ID. Here's an example:
1 FredsFlowers active
2 JohnsStationery inactive
3 FredFlowers inactive
4 SuesBakery active
5 JohnsStationery inactive
I need to flag the 'current' record for a given supplier. In this case it would be ID = 1,2 and 4
The excel logic is:
1. if there is one active record, it's the current record.
2. if there is an active record and multiple inactive records, the active record is the current record.
3. if there is only one record and it's inactive, it's the current record.
4. if there are multiple inactive records, pick the first record in the list to be the current record.
What is the best way to do this? In Power Query (I don't know M) or Power Pivot? If Power Pivot, how do I implement the logic (I tried a calculated column but could only get the formula to work for point 1 above).
Thanks