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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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