Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Below is my data, the second column is the unique idenfier I am trying to create a formula each month to say new/existing. If it was in previous month it is existing if it wasn't its new. I have tried so many ways and just can't get it. Right now I only have Feb/Mar data loaded. Thanks in advance.
Solved! Go to Solution.
Hi @Anonymous ,
You can create a measure as below:
New/Existing =
VAR _curperiod =
SELECTEDVALUE ( 'SBU'[Report Period] )
VAR _curid =
SELECTEDVALUE ( 'SBU'[ID] )
VAR _count =
CALCULATE (
COUNT ( 'SBU'[ID] ),
FILTER (
ALL ( 'SBU' ),
'SBU'[ID] = _curid
&& 'SBU'[Report Period] <= _curperiod
)
)
RETURN
IF ( _count > 1, "Existing", "New" )
If the above one is not working for your scenario, please provide your expected result with sample or screenshot. Thank you.
Best Regards
Hi @Anonymous ,
You can create a measure as below:
New/Existing =
VAR _curperiod =
SELECTEDVALUE ( 'SBU'[Report Period] )
VAR _curid =
SELECTEDVALUE ( 'SBU'[ID] )
VAR _count =
CALCULATE (
COUNT ( 'SBU'[ID] ),
FILTER (
ALL ( 'SBU' ),
'SBU'[ID] = _curid
&& 'SBU'[Report Period] <= _curperiod
)
)
RETURN
IF ( _count > 1, "Existing", "New" )
If the above one is not working for your scenario, please provide your expected result with sample or screenshot. Thank you.
Best Regards
I get this to work in a measure. Can it be created in a column?
Hello, all data is in one table?
Hi, @Anonymous
Do you have custom-date-table ?
Yes, I have a standardard date table
Hi, @Anonymous
Then you can create one measure as I mentioned above.
All data come from the date table, and your main table.
Hi, @Anonymous
Please correct me if I wrongly understand your question.
Inside your measure, please try to define the below by using VAR.
first table: VALUES(customersID-culumn) as current month customer, and
second table: calculatetable (VALUES(customersID-culumn), filter(alldatestable, monthnumber = maxmonthnumber-1)) as previous month customer.
intersect (first table, second table) = existing customers table
except (first table, second table) = new customer table
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
79 | |
73 | |
58 | |
36 | |
32 |
User | Count |
---|---|
90 | |
60 | |
60 | |
49 | |
45 |