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.
Hola amigos me pueden ayudar a llenar la siguiente tabla en power BI, la tabla la tengo de la siguiente manera
Pero necesito una sumatoria por fila de cada mes, algo asi
Alguien podría explicarme como se hace, llevo 3 dias buscándolo 😞
Solved! Go to Solution.
Hi @VladimirRSA ,
This is my test table:
Unpivot other columns in Power Query:
Then you will get a table like this:
Create two new columns:
MonthNumber = SWITCH(
TRUE(),
'Table'[Attribute] = "January",1,
'Table'[Attribute] = "Februray",2,
'Table'[Attribute]= "March",3,
'Table'[Attribute] = "April",4,
'Table'[Attribute] = "May",5
)
SumValue = CALCULATE(SUM('Table'[Value]),FILTER('Table','Table'[Attribute] = EARLIER('Table'[Attribute])))
Did you want to create a table visual?
Or create a new table?
If you want to create a new table, please try following DAX:
NewTable = VALUES('Table'[MonthNumber])
Month = LOOKUPVALUE('Table'[Attribute],'Table'[MonthNumber],'NewTable'[MonthNumber])
Total = LOOKUPVALUE('Table'[SumValue],'Table'[MonthNumber],'NewTable'[MonthNumber])
You will get a new table like this:
Best regards,
Yadong Fang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @VladimirRSA ,
This is my test table:
Unpivot other columns in Power Query:
Then you will get a table like this:
Create two new columns:
MonthNumber = SWITCH(
TRUE(),
'Table'[Attribute] = "January",1,
'Table'[Attribute] = "Februray",2,
'Table'[Attribute]= "March",3,
'Table'[Attribute] = "April",4,
'Table'[Attribute] = "May",5
)
SumValue = CALCULATE(SUM('Table'[Value]),FILTER('Table','Table'[Attribute] = EARLIER('Table'[Attribute])))
Did you want to create a table visual?
Or create a new table?
If you want to create a new table, please try following DAX:
NewTable = VALUES('Table'[MonthNumber])
Month = LOOKUPVALUE('Table'[Attribute],'Table'[MonthNumber],'NewTable'[MonthNumber])
Total = LOOKUPVALUE('Table'[SumValue],'Table'[MonthNumber],'NewTable'[MonthNumber])
You will get a new table like this:
Best regards,
Yadong Fang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you very much it was very useful
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 |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |