Forum Discussion
Iamnvt
Continued Contributor
7 years agoManual Data input for calculated columns
hi, how can I enter a data manually for a calculated column in DAX? I know we can do that easily with Enter Data table in Power Query; however, I am wondering if we have an DAX function that let ...
- 7 years ago
Hi Iamnvt
Open Edit queries, create an index column (from 1) for the exsiting table
Then close&&apply,
in the data model,
Create a column
Column = SWITCH([Index],1,"a",2,"b",3,"c",4,"d")
Best Regards
MaggieCommunity Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Gordonlilj
Solution Sage
7 years agoHi,
You could try and use the dax function DATATABLE like the example below
TestData = DATATABLE(
"Store", STRING,
"Sales", INTEGER,
{
{"Store 1",3500000},
{"Store 2",4500000},
{"Store 3",1115500},
{"Store 4",1225540},
{"Store 5",6433000}
}
)
- Iamnvt7 years ago
Continued Contributor
Hi,
This function doesnt work with calculated column.
It creates a new table!
I have a table already, now I just want to categorize some of the value in the table manually.