Forum Discussion
Static Row Headers with calculated row values
- Anonymous3 years ago
Hi appsac1 ,
I need to know where your data in three columns come from, a data table or you just want to create a calculated table?
If you want to create a calculated table in Power BI, you can try this code.
Table = DATATABLE( "static row headers",STRING, "Current Year",INTEGER, "Piror Year",INTEGER, "Year Over Year Change",INTEGER, {{"Returns","50","40","10"}, {"Sales","125","105","20"}, {"Shipped","45","30","15"} } )Result is as below.
If you want to calcualte based on data in fact table, please share a sample file with me.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi appsac1 ,
I need to know where your data in three columns come from, a data table or you just want to create a calculated table?
If you want to create a calculated table in Power BI, you can try this code.
Table =
DATATABLE(
"static row headers",STRING,
"Current Year",INTEGER,
"Piror Year",INTEGER,
"Year Over Year Change",INTEGER,
{{"Returns","50","40","10"},
{"Sales","125","105","20"},
{"Shipped","45","30","15"}
}
)
Result is as below.
If you want to calcualte based on data in fact table, please share a sample file with me.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.