Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
jacob2102
Helper II
Helper II

Datos únicos del año sin incluir datos alcanzados años anteriores

Hello everyone,

 

I'm developing a participation analysis, and I would like to obtain 2 different measures:

  1. Number of unique companies involved in the activity, in the selected period.
    1. DAX = DISTINCTCOUNTNOBLANK(Participation[Id_Entity] (associated with the date of the activity).
  2. Number of unique companies involved in the activity in the selected period, and that have not involved in previous periods.
    1.   DAX = ??? (associated with the date of the activity).

How can I get the second measure? 

The analysis is for four years, and I need to know each selected period the new participating companies.

 

Thanks.

Regards,

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@jacob2102 , refer I have used customer ID and Isblank and monthly measures, Same can help you to build

 

Customer Retention Part 1:
https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-1-Month-on-Month-Retention/b...

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

v-yangliu-msft
Community Support
Community Support

Hi  @jacob2102 ,

Is your problem solved, you can also try the following:

I created some data:

vyangliumsft_0-1648540833896.png

Here are the steps you can follow:

1. Create calculated table.

vyangliumsft_1-1648540833899.png

2. Create measure.

Flag =
var _min=MIN('Date'[Date])
var _max=MAX('Date'[Date])
return
IF(
    MAX('Table'[date])>=_min&&MAX('Table'[date])<=_max,1,0)
Number of participants =
CALCULATE(DISTINCTCOUNT('Table'[companies]),ALLSELECTED('Table'))
Number of non-participants =
var _all=CALCULATE( DISTINCTCOUNT('Table'[companies]),ALL('Table'))
return
_all -[Number of participants]

3. Place [Flag]in Filters, set is=1, apply filter.

vyangliumsft_2-1648540833900.png

4. Result:

vyangliumsft_3-1648540833901.png

If I have misunderstood your meaning, please provide your desired output and your pbix without privacy information.

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

3 REPLIES 3
v-yangliu-msft
Community Support
Community Support

Hi  @jacob2102 ,

Is your problem solved, you can also try the following:

I created some data:

vyangliumsft_0-1648540833896.png

Here are the steps you can follow:

1. Create calculated table.

vyangliumsft_1-1648540833899.png

2. Create measure.

Flag =
var _min=MIN('Date'[Date])
var _max=MAX('Date'[Date])
return
IF(
    MAX('Table'[date])>=_min&&MAX('Table'[date])<=_max,1,0)
Number of participants =
CALCULATE(DISTINCTCOUNT('Table'[companies]),ALLSELECTED('Table'))
Number of non-participants =
var _all=CALCULATE( DISTINCTCOUNT('Table'[companies]),ALL('Table'))
return
_all -[Number of participants]

3. Place [Flag]in Filters, set is=1, apply filter.

vyangliumsft_2-1648540833900.png

4. Result:

vyangliumsft_3-1648540833901.png

If I have misunderstood your meaning, please provide your desired output and your pbix without privacy information.

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

amitchandak
Super User
Super User

@jacob2102 , refer I have used customer ID and Isblank and monthly measures, Same can help you to build

 

Customer Retention Part 1:
https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-1-Month-on-Month-Retention/b...

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Thanks for your answer.

 

I am going to create an aditional column to identify the first participation date and then create a relationship to exclud the dates.

 

Thanks.

Regards,

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.