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

How to display a default value from a list of values

Hi,

Is there any way to get the default value to show from a set of values?

I am using Switch statemet, but it's not fetching me the exact result I am looking for.Kindly let me know if any more information

is required for anlysis.

 

Thanks,

Ravi

2 REPLIES 2
v-shex-msft
Community Support
Community Support

Hi @Anonymous,

 

>>I am using Switch statemet, but it's not fetching me the exact result I am looking for.Kindly let me know if any more information is required for anlysis.

Switch function contains the default value, you can write the default value at the end of the formula.

 

For example:

 

Measure:
Swith Statement = SWITCH(MAX(source[Value]),1,"first",2,"second","default")

Calculate column:
Swith Statement = SWITCH(source[Value],1,"first",2,"second","default")

 

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

Hi Xiaoxin,

Thanks for your update, Please find the below link for the actual issue that I am facing, hope this helps you for the understanding.

 

https://community.powerbi.com/t5/Desktop/Help-With-Formula-to-get-default-values/td-p/143600

 

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.