The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi All,
I was wondering if anyone had a solution for identifying new companies that have been added to my report?
For example, i would like a script to check the "Comapny" column to see if any exisitng record exists, then output either renewal or new in the furthest right column(new if no record exists) Then if a new opp comes into the table with the same company, change the output to renewal.
Company | Opp | Year | Renewal or New |
X | XY | 2017 | Renewal |
X | AB | 2018 | Renewal |
X | CD | 2019 | Renewal |
Y | EF | 2019 | New |
Any help would be greatl
Solved! Go to Solution.
Hi @PowerBI87,
If there is one field that can identify new records (such as the date field in the below screen shot) in your table, it may be easier to obtain which companies are new or renewed. Just create a calculated column with the following formula:
Renewal or New =
VAR _countofC =
CALCULATE (
COUNT ( Company[Company] ),
FILTER (
ALL ( 'Company' ),
'Company'[Company] = EARLIER ( 'Company'[Company] )
)
)
RETURN
IF ( 'Company'[Date] = TODAY () && _countofC = 1, "New", "Renewal" )
Best Regards
Rena
Hi @PowerBI87,
If there is one field that can identify new records (such as the date field in the below screen shot) in your table, it may be easier to obtain which companies are new or renewed. Just create a calculated column with the following formula:
Renewal or New =
VAR _countofC =
CALCULATE (
COUNT ( Company[Company] ),
FILTER (
ALL ( 'Company' ),
'Company'[Company] = EARLIER ( 'Company'[Company] )
)
)
RETURN
IF ( 'Company'[Date] = TODAY () && _countofC = 1, "New", "Renewal" )
Best Regards
Rena
Saving state is not a strong suit of Power BI. You could load the "company" table twice and turn off refresh for one of them. Then you could compare.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
79 | |
72 | |
48 | |
41 |
User | Count |
---|---|
138 | |
108 | |
69 | |
64 | |
57 |