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
Stanzarectah
Regular Visitor

Create a list of measures and their values in a column

Hi,

 

I would like to convert some measure values:

 

Stanzarectah_0-1653004995446.png

into a table like this:

 

NameActual
Total Income($6,075,988)
Total Expense$18,450
Total COGS$4,452,726

 

Any ideas?

 

1 ACCEPTED SOLUTION
johncolley
Solution Sage
Solution Sage

Hi @Stanzarectah

 

You can accomplish this with a disconnected (no relationships to other tables) table that holds the values of the measures you want to display.

 

johncolley_0-1653007245067.png

 

Then use a switch statement to display the correct value.

 

display = 
var selection = SELECTEDVALUE(Disconnected[Measure Name])
RETURN
SWITCH(
TRUE(),
Selection = "Total COGS", 'Time'[Total COGS],
Selection = "Total Expense", 'Time'[Total Expense],
Selection = "Total Income", 'Time'[Total Income])

Then create a table with the Measure column from the disconnected table and the display measure.

johncolley_1-1653007371382.png

 

 

View solution in original post

2 REPLIES 2
johncolley
Solution Sage
Solution Sage

Hi @Stanzarectah

 

You can accomplish this with a disconnected (no relationships to other tables) table that holds the values of the measures you want to display.

 

johncolley_0-1653007245067.png

 

Then use a switch statement to display the correct value.

 

display = 
var selection = SELECTEDVALUE(Disconnected[Measure Name])
RETURN
SWITCH(
TRUE(),
Selection = "Total COGS", 'Time'[Total COGS],
Selection = "Total Expense", 'Time'[Total Expense],
Selection = "Total Income", 'Time'[Total Income])

Then create a table with the Measure column from the disconnected table and the display measure.

johncolley_1-1653007371382.png

 

 

Thank you so much @johncolley for the quick response !

 

I was able to achieve this and it works like a charm.

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.