The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hola a todos
les pido su ayuda para crear un conteo de registros unicos con power query contando la primera vez que aparece y luego dejarlo en ceros.
un ejemplo
Desde ya muchas gracias!!
Saludos
Solved! Go to Solution.
Hi @fav_ccc2021 ,
Thank you for your response. The @Irwan , suggestion is correct you can add an additional criterion to ensure the DAX logic works properly. Based on your description, it seems the current approach only considers ID.
To refine the count and avoid duplication, you might need to consider both ID and ACTIVIDAD when identifying the max date. Could you share a sample dataset showing cases where the record appears more than once for the same date? This would help tailor the solution to your needs.
Regards,
Yugandhar.
Hi @fav_ccc2021 ,
Following up to check whether you got a chance to review the suggestion given.If it helps,consider accepting it as solution,it will be helpful for other members of the community who have similar problems as yours to solve it faster. Glad to help.
Thank You.
Hi @fav_ccc2021 ,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.
Hi @fav_ccc2021 ,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
H @fav_ccc2021 ,
Thanks for reaching out to the Microsoft Fabric Community.
I’ve tested the solution shared by @Irwan , and it works perfectly it meets your requirements as described. If you need any additional details or further assistance, feel free to let us know.
FYI:
Special thanks to @Irwan for your valuable contribution to the community.
If your issue is resolved, please consider marking the response as the Accepted Solution to help others facing a similar issue find it more easily.
Hola, muchas gracias por la ayuda, el problema que tengo es que tengo el registro mas de una vez para la misma fecha, entonces lo cuenta en ambas con un 1. Es posible agregar otro criterio para que respete el conteo?
Desde ya muchas gracias!
Hi @fav_ccc2021 ,
Thank you for your response. The @Irwan , suggestion is correct you can add an additional criterion to ensure the DAX logic works properly. Based on your description, it seems the current approach only considers ID.
To refine the count and avoid duplication, you might need to consider both ID and ACTIVIDAD when identifying the max date. Could you share a sample dataset showing cases where the record appears more than once for the same date? This would help tailor the solution to your needs.
Regards,
Yugandhar.
hello @fav_ccc2021
i dont speak spanish so i use google translate
Hello, thank you very much for the help. The problem I have is that I have the record more than once for the same date, so it counts it as 1 in both. Is it possible to add another criterion to respect the count? Thank you in advance!
you absolutely can add another criteria to make sure the DAX works as intended.
But looking at your expected result, the criteria only the ID as far as i can tell. For the same ID, you want to get the max date.
You can add another value for example, get max date for the same ID AND same ACTIVIDAD.
otherwise, please share a sample data about "the record more than once for same date" as you mentioned above.
Thank you.
hello @fav_ccc2021
please check if this accomodate your need.
create a new calculated column with following DAX.
CUENTA =
var _MaxDate =
CALCULATE(
MAX('Table'[FECHA]),
ALLEXCEPT('Table','Table'[ID])
)
Return
IF(
'Table'[FECHA]=_MaxDate,
1,
0
)