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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.