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

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.

Reply
Fabiano_39
Frequent Visitor

Ayuda en distribución de datos

Amigos de la comunidad, necesito su ayuda para resolver caso, cuento con una medida dax la cual suma la cantidad de registros de columnas llamadas participantes (4 en total) y en base a esto, necesito que los datos de esta medida se distribuyan en partes iguales cuando la categoría de la columna facultad sea TODAS.

 

El gráfico tiene por función medir la cantidad de participantes por facultad, por lo que se desea que esté categoría no sea parte del informe, y que sus datos se distribuyan en partes iguales al resto de las facultades.

 

Agradecería mucho su apoyo.

 

¡Gracias!

 

 

9 REPLIES 9
Fabiano_39
Frequent Visitor

Hi Amira, 

 

I attach the link with access to the .pibx file so you can review.

 

https://drive.google.com/file/d/14o5ki4tgj2yfTgJVtEnx58zgCLM6sg77/view?usp=sharing

 

Thanks!!

Hi Amira, Nice to greet you, I wanted to ask you if you were able to review the file

AmiraBedh
Resident Rockstar
Resident Rockstar

I am assuming that you have a measure that sums the participants across 4 columns. If not, you can create it as follows:

SumParticipants = SUM(Table[Participant1]) + SUM(Table[Participant2]) + SUM(Table[Participant3]) + SUM(Table[Participant4])

Then, you need to count the number of faculties, excluding the category ALL :

TotalFaculties = COUNTAX(FILTER(ALL(Table[faculty]), Table[faculty] <> "ALL"), Table[faculty])

Then :

DistributeParticipants =
VAR ParticipantsAll = CALCULATE([SumParticipants], Table[faculty] = "ALL")
VAR ParticipantsPerFaculty = IF(MAX(Table[faculty]) = "ALL", 0, [SumParticipants])
VAR Distribution = ParticipantsAll / [TotalFaculties]
RETURN ParticipantsPerFaculty + Distribution

Try and tell us !


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

Hola Amira! gracias por tu ayuda, estuve muy cerca por lo que vi, pero el cálculo no me arrojó los resultados que esperaba, ya que la distribución de datos se hizo entre todas las categerías (incluyendo la categoría TODAS). El resultado en la distribución de la suma de las categprías se comprobó y está perfecto, pero necesito que la categoría TODAS se reparta por completo.

 

Aqui se ve en el gráfico con la medida aplicada:

 

Fabiano_39_0-1704678796216.png

 

En este caso, los datos totales de la categoría TODAS antes de aplicar la medida eran de 137 participantes, y lo que sucedió con la medida nueva es que se dividio un total de 23 participantes por categoría, lo cual mirandolo desde el lado de la operación, el cálculo es correcto.

 

Gracias!

 

Quedo atento y gracias!!

Hello, can you please provide your question in English ? Also can you share your model ?


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

Hello Amira, I was reviewing the measurements you gave me and there was an error in the data I entered in total faculties (the name of the category had not changed). However, when making the change, it gives me other results where I see that a distribution was made but the ALL category continues to be displayed.

 

Fabiano_39_0-1704724545137.png

 

I made a comparison between the measurement "total participants" and "participants distribution" and the results are seen in the image.

Please also tell me how I can share my data model with you so you can view it. I currently work with a business account and I don't know if I can share it.

 

Thanks!

 

Can you please provide your model ? your input and expected output ?


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

Amira, I don't know how to share the model with you, I'm sorry, could you help me with that and tell me how to do it?

Put it on Google Drive and share the link 🙂


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.