Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Anonymous
Not applicable

Calculated table basesed on a union of selects of constants or measures

Hello,

 

Is it possible to mak a calculated tabel that's made of constant values

 

Table = UNION(
SELECT "Value 1" AS Column;
SELECT "Value 2";
SELECT "Value 3";
SELECT "Value 4"
)
that would result in:
 
Table.jpg
 
Of course I could make a new table using "Enter data"

Enter_Data.jpg
 
but I want to use measures in stead of contstant values
 
Table = UNION(
SELECT Measure1 AS Column;
SELECT Measure2;
SELECT Measure3;
SELECT Measure4
)
 In this way it becomes a dynamic table.
 
 
Thanks,
 
R.W.
4 REPLIES 4
V-pazhen-msft
Community Support
Community Support

@Anonymous 

You can use curly braces { }, it's a table expression that allows you to enter any value on each row, as well as measure. 

 

Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Anonymous , one or more you can do like

union(
selectcolumns(table1,"ColA", table1[Column A],"ColA", table1[Column B],"ColF", table1[Column F]),
selectcolumns(table2,"ColA", table2[Column A],"ColA", table2[Column B],"ColF", table2[Column F])
)

 

Or you can use summarize in place of selectcolumns

Balance Sheet = union(SUMMARIZE(Sales,Sales[Brand],"Col1",sum(Sales[Sales]),"Col2",sum(Sales[COGS]),"sort",COUNTROWS(Sales))
,SUMMARIZE(Sales1,Sales1[Brand],"Col1",sum(Sales1[Sales]),"Col2",sum(Sales1[COGS]),"sort",COUNTROWS(Sales1)) )

Anonymous
Not applicable

@amitchandak 

 

Thanks,

But its not what I'm looking for.
I don't want the records comming directly from tables.
I want de values be constants and/or Measure values.

 

R.W.

@Anonymous 

 

Try this 

Table = {[Measure],[Measure 2]}

out.JPG 



Did I answer your question? Mark my post as a solution!
Appreciate with a kudos
🙂


Regards,
Nandu Krishna

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.