1
votes

I have two SQL functions in Power BI

SQL Scalar-Valued Function in Power Bi

Each returns one number each (say fn_1 =3 fn_2 = 4). What I am trying to do is create a table that has 2 column 1 row with fn_1 as a colum and fn_2 as the 2nd column

|---------------------|------------------|
|        fn_1         |       fn_2       |
|---------------------|------------------|
|          3          |          4       |
|---------------------|------------------|

Tried duplicate, combine, aggregate, merge. They're all returning something different.

Thanks

EDIT: The only reason wanting to do that is so I can combine them into 1 row as 3/4 (which I can do fine with regular table) have both values (3 and 4 as 3/4) display on top of a report as 3/4 using a card.

1

1 Answers

0
votes

For two values, I'd try some basic table constructions:

#table({"fn_1", "fn_2"}, {{fn_1, fn_2}})

or

Table.FromRecords({[fn_1 = fn_1, fn2 = fn_2]})

or

Table.FromColumns({{fn_1}, {fn_2}}, {"fn_1", "fn_2"})