Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
136 | |
117 | |
101 | |
71 | |
61 |