Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
buen dia
estimados necesito contar en una columana diferentes codigos, y en una columna nueva poner si el codigo esta repetido en la columna original o no.
muchas gracias por la ayuda.
Solved! Go to Solution.
hi @munder
For this logic, just use this formula to create a new column:
CALCULATE(DISTINCTCOUNT('Table'[comment]),FILTER('Table','Table'[fecha]=EARLIER('Table'[fecha])&&'Table'[sala]=EARLIER('Table'[sala])))
Regards,
Lin
@munder , Can you share sample data and sample output.
You can use distinctcount and count to check what is repeating
Measure = distinctcount (Table[A1]) -count (Table[A1])
fecha | comment | sala | informacion |
03-03-2020 | 456 | 1 | sala compartida |
03-03-2020 | 455 | 1 | sala compartida |
03-03-2020 | 457 | 2 | sala sola |
03-03-2020 | 458 | 3 | sala sola |
04-03-2020 | 456 | 1 | sala compartida |
04-03-2020 | 455 | 1 | sala compartida |
04-03-2020 | 457 | 2 | sala sola |
04-03-2020 | 458 | 3 | sala sola |
Hi @amitchandak thank for the help, the idea is count if a comment is use in the same "sala" for a same "date", so if that is the case we call "sala Compartida" and if the comment is use in only one "sala" per "date" we call "sala sola"
hi @munder
You could use EARLIER to create a column as below:
Result =
IF( CALCULATE(DISTINCTCOUNT('Table'[comment]),FILTER('Table','Table'[fecha]=EARLIER('Table'[fecha])&&'Table'[sala]=EARLIER('Table'[sala])))>1,
"sala Compartida",
"sala sola")
Result:
and here is sample pbix file, please try it.
Regards,
Lin
the problem with this is you only think in 2 or 1 counting and for the rest all is compartida, but i have for example this
fecha | comment | sala | informacion |
03-03-2020 | 456 | 1 | sala compartida |
03-03-2020 | 455 | 1 | sala compartida |
03-03-2020 | 457 | 1 | sala compartida |
03-03-2020 | 458 | 2 | sala compartida |
03-03-2020 | 456 | 2 | sala compartida |
03-03-2020 | 458 | 3 | sala sola |
03-03-2020 | 458 | 3 | sala sola |
03-03-2020 | 458 | 3 | sala sola |
thanks and regards
hi @munder
The logic for this for the same fecha and same sala, DISTINCTCOUNT comment, if the result is greater than 1, it returns sala compartida otherwise, returns sala sola.
What is your logic of your expected output? Could you please explain it more clearly?
Please see this post regarding How to Get Your Question Answered Quickly:
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Regards,
Lin
the logic is if a "room" how many have the same comment and date.
im will change the query with this logic.
thanks and greetings
the logic is if a "sala" how many have the same comment and date.
im going to change the query with this logical.
thanks and regards
hi @munder
For this logic, just use this formula to create a new column:
CALCULATE(DISTINCTCOUNT('Table'[comment]),FILTER('Table','Table'[fecha]=EARLIER('Table'[fecha])&&'Table'[sala]=EARLIER('Table'[sala])))
Regards,
Lin
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
97 | |
94 | |
74 | |
71 | |
64 |
User | Count |
---|---|
143 | |
109 | |
103 | |
82 | |
74 |