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.
Tengo los siguientes datos:
(Ejemplo 1)
Fecha--------Role---Proyecto---Cursto---Horas
1/1/2020---A------Red-------Boy---------1
1/1/2020---A------Red-------Girl---------2
1/1/2020---A------Blue-------Boy---------1
1/1/2020---A------Blue-------Girl---------2
1/1/2020---B------Red-------Boy---------1
1/1/2020---B------Red-------Girl---------2
1/1/2020---B------Blue-------Boy---------1
1/1/2020---B------Blue-------Girl---------2
1/2/2020---A------Red-------Boy---------1
1/2/2020---A------Red-------Girl---------3
1/2/2020---A------Blue-------Boy---------1
1/2/2020---A------Blue-------Girl---------3
1/2/2020---B------Red-------Boy---------1
1/2/2020---B------Red-------Girl---------3
1/2/2020---B------Blue-------Boy---------1
1/2/2020---B------Blue-------Girl---------3
Hay un máximo de 2 valores para Role, 2 valores para Project y 2 valores para Resource para un total de 8 combinaciones posibles en cualquier fecha determinada.
En una fecha determinada, todos los valores de Hour for Boy serán los mismos y todos los valores de Hour for Girl serán los mismos.
Necesito trazar el número de horas para cada día con una línea para Boy y una línea para Girl, y una tercera línea que es la suma de Boy and Girl. Sin embargo, si Boy aparece más de una vez en una fecha determinada, sólo quiero que sus horas se cuenten una vez (no 4 veces). Quiero lo mismo para Girl.
Resultado actual:
1/1/2020:
- Niño 4 horas
- Chica 8 horas
- Total 12 horas
1/2/2020:
- Niño 4 horas
- Chica 12 horas
- Total 16 horas
Resultado deseado:
1/1/2020:
- Niño 1 horas
- Chica 2 horas
- Total 3 horas
1/2/2020:
- Niño 1 horas
- Chica 3 horas
- Total 4 horas
No todos los proyectos, roles o recursos aparecerán en cada día. Esperaría obtener los mismos resultados derivados anteriores de los datos en el ejemplo 2 a continuación:
(Ejemplo 2)
Fecha--------Role---Proyecto---Cursto---Horas
1/1/2020---A------Red-------Boy---------1
1/1/2020---A------Red-------Girl---------2
1/1/2020---A------Blue-------Boy---------1
1/1/2020---A------Blue-------Girl---------2
1/2/2020---B------Red-------Boy---------1
1/2/2020---B------Red-------Girl---------3
1/2/2020---B------Blue-------Boy---------1
1/2/2020---B------Blue-------Girl---------3
Pregunta adicional (esto no es tan importante como la pregunta anterior:
Me gustaría poder profundizar en los datos. Por ejemplo, si ded cálculo el total de horas para un día, obtendría lo siguiente:
1/1/2020:
- Total 3 horas
1/2/2020:
- Total 4 horas
Esto aparecería como una línea en un gráfico de líneas. Pero entonces quiero ser capaz de hacer clic en esa línea y que me muestre dos líneas; uno para las horas para el rol A y otro para las horas del rol B. Me gustaría hacer clic en la línea para el rol A y hacer que muestre dos líneas; uno para las horas del proyecto Rojo y otro para las horas del proyecto Blue. Entonces me gustaría hacer clic en la línea para el proyecto Azul y que me muestre dos líneas más; uno para las horas para Boy y otro para las horas para Girl.
Solved! Go to Solution.
Hola
Puede descargar mi archivo PBI desde aquí.
Espero que esto ayude.
Hola
Puede descargar mi archivo PBI desde aquí.
Espero que esto ayude.
@Ashish_Mathur, esto funcionó en parte. Al tratar de simplificar mi ejemplo, dejé fuera una columna de datos. He añadido los datos y se puede descargar un archivo en haga clic AQUI.
Si nos fijamos en los gráficos de líneas verá mis problemas.
Ejemplo 1: Horas por fecha y tipo
El horario de AVL debe ser de 6 cada día.
Las horas de PLN son correctas a las 16 cada día.
Ejemplo 2: Horas por fecha y rol
Las horas de AVL para A deben ser de 6 cada día.
Las horas de AVL para B deben ser de 6 cada día.
Ejemplo 3: Horas por Dat y Proyecto
Las horas AVL para azul deben ser 6 cada día.
Las horas de AVL para rojo deben ser 6 cada día.
Ejemplo 4: Horas por fecha y recurso
Las horas de AVL para niño deben ser 2 cada día.
AVL Hours for Girl debe ser 4 cada día.
Hola
No entiendo. Hazlo simple. Comparta un conjunto de datos con las columnas necesarias y muestre el resultado esperado.
@Ashish_Mathur , I have placed new zip file HERE.
I included all 3 source Excel files and the Power Bi File.
On the reports:
The top line chart should show the total AVL and PLN hours by Date. (One line for PLN and one Line for AVL.)
The bottom stacked area chart should show the total PLN hours by Date grouped by Data Source. (There are three data sources so there shoul be three stacked areas.)
Calculating PLN hours on a given Date:
Toal PLN hours on 1/1/2020 = Sum of all the PLN hours for all the Projects on 1/1/2020.
Project PLN hours = Sum of all the PLN hours for all the Roles on 1/1/2020.
Roles PLN hours = Sum of all the PLN hours for all the resources on 1/1/2020.
Resource PLN hours = A given value in the table on 1/1/2020 (these are not calculated).
Calculating AVL hours on a given Date:
The AVL hours are calculated in the same way as the PLN hours are calcuated BUT the AVL hours for a resource should only be counted once on any given Date no matter how many times they are listed on that date. For example, if on 1/1/2020 a Resource is working on two different projects, they will be lsited twice on 1/1/2020. The AVL hours on that date for that resource should only be counted once.
Hola
Todavía no lo tengo claro. En lugar de centrarse en el gráfico que desee, concéntrese en la salida que desee en un formato de tabla simple. Una vez que las figuras en la tabla son correctas, sólo tenemos que hacer clic en el gráfico de líneas visual para obtener nuestro gráfico deseado. Como se puede ver en la imagen de abajo, he cambiado sus objetos visuales a un formato de tabla simple. Sólo avísame qué cifras exactas esperas en la Mesa. Si es posible, puede incluir un libro de MS Excel con cálculos basados en fórmulas. Traduciré esas fórmulas en formlas DAX.
@Ashish_Mathur , I'm sorry I am not doing a very good job explaining things. I have gone really simple this time. Please click HERE and download the file "Very Simple Rev 1".
The line chart is not displaying what I need.
The PLN line is correct. It plots the value of 3.5 FTE for all four days. It sums all the FTE of Type PLN on each day.
The AVL line is not correct. It plots the value of 12 FTE for all four days. It is summing all the FTE of Type AVL on each day. I want it to plot the value of 3 FTE on each day. All the FTE Values of Type AVL on a given day will always be the same. I want that single FTE value on that day, not the sum of all the FTE values on that day.
Explination:
Example:
Hi,
You may download my PBI file from here.
Hope this helps.
@Ashish_Mathur , this is fantastic! It works very well. Now I want to ask a little more complicated question. Please download the REV 2 file HERE.
This example worked well when there was only one value for Resource. Now I need to figure out how to do it when I have two Resources. I duplicated the 32 rows from REV 1 and chnaged only the Resource on those new rows from "Boy" to "Girl". I need the data in the line charts to now double.
For Example:
Additional Note:
I need to be able to filter by Resource and have both the AVL and PLN hours update appropriately.
In the future, there will also be many different Roles. At that time, I need to have the line chart dispaly the correct data if I filter on Role and Resource.
Hi,
You may download my PBI file from here.
Hope this helps.
@Ashish_Mathur , Thank you for your file. I looked at it and it final helped me understand your method for solving my problem. However, I don't think looking for "Min" values is going to work. I decided to start over with an entirely new approach. I made multiple tables and linked them all together. It worked really well. You can find the files HERE if you are interested in seeing how I solved the problem. Download both the Excel file and BI file for REV 3.
Thank you for your help!
@Ashish_Mathur , I am new to Power BI. Is a data set different than what is downloadable at the link I provided in my last message?
@Ashish_Mathur , this worked partly. In trying to simplify my example I left out a column of data. I have added the data and you can download a file at by click HERE.
If you look at the line charts you will see my problems.
Example 1: Hours by Date and Type
AVL Hours should be 6 each day.
PLN Hours are correct at 16 each day.
Example 2: Hours by Date and Role
AVL Hours for A should be 6 each day.
AVL Hours for B should be 6 each day.
Example 3: Hours by Dat and Project
AVL Hours for Blue should be 6 each day.
AVL Hours for Red should be 6 each day.
Example 4: Hours by Date and Resource
AVL Hours for Boy should be 2 each day.
AVL Hours for Girl should be 4 each day.
@mattbstrong , Pruebe una medida como
sumx(summarize(Table, Table[Date], Table[Resource], "_hr",max(Table[Hours])),[_hr])
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 |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |