A current limitation in Power BI SWITCH measures (and all Power Pivot actually) is that a SWITCH measure must have a single format. It is currently not possible to conditionally format the measure result based on any criteria - it is one single format only. There are valid use cases where you may want to change the format of the SWITCH measure depending on the result. Consider the following SWITCH statement myMeasure = SUMX(MeasureTable,switch([selected measure], 1,[Total Sales], 2,[Total Cost], 3,[Total Margin], 4,[Chg Sales vs LY %] )) The first 3 results are all currency format, but the last result is a percentage format. This currently can't be controlled. I would like to see an optional 3rd parameter in the SWITCH statement to set an alternate number format.
78 Comments
- do1New MemberAn option to "inherit" the formatting of the source measure would be nice. But it would be even better if a more general solution was provided, similar to how SCOPE statements work in SSAS multidimensional.
- fbcideas_migusrNew MemberGreat idea - I use this feature a lot on a Power Pivot Disconnected Slicer and it would be great to be able to do the same with Power BI.
- ffarah1New MemberThis change would make things a lot simpler and the switch option way more powerful and useful
- fbcideas_migusrNew MemberHere is a simple demo of the problem http://exceleratorbi.com.au/wp-content/uploads/2016/07/switch-measure.gif
- fbcideas_migusrNew MemberMust have, agree. Have several scenarios where it would be the best solution.
- Sohail
Advocate IV
Must have Regards sohail - HansMostafavi
Advocate I
100% agree - DirectorAlwynNew MemberEven more than just the percentage vs. currency, there are lots of situations where you might want text or numbers, especially for error/out of bounds handling where this would be very helpful.
- joeryNew MemberGreat idea, I would love to see this!
- fbcideas_migusrNew Member'@Cheries Mewengkang, what you described will render the number as a text string in a table. This is not the same as changing the number format. If you change the number to a text string, you can't use it in charts or any other place that requires numbers (eg calcs)
Recent ideas
Deployment Pipelines: preserve/override schedules per environment (no overwrite on deploy)
When deploying from Dev/Non-Prod to Prod, the target’s pipeline schedule is overwritten. Please add deployment rules (or an opt-out) so schedules can be environment-specific without showing as drift ...JP899110 minutes agoKudo CommanderUnder Review4KViews66likes22CommentsSupport Power BI connection with Salesforce community URL
Before Salesforce changed customer links to my.site.com our customers were able to connect salesforce with power bi and use their own logins in Power BI and maintain the security from Salesforce. No...gilmore_staci5 hours agoHelper IIINew3Views0likes0CommentsShow all email recipients when sending subscription
When a subscription is sent out, the recipients can only see themselves and not everyone who received that subscription. We would like the subscription to show everyone who received that subscription...jhawkfan5 hours agoNew MemberNew4Views0likes0CommentsMake workspace and item session persistence optional
Description The new persistent session behavior in Microsoft Fabric should be optional rather than forced. Currently, Fabric remembers the workspaces and items that were open in my previous session...TeemuMultanen5 hours agoAdvocate IVNew429Views72likes4CommentsFabric workspace Connection Link (XMLA Endpoint) using Workspace ID instead of Name
Dear colleagues, As you already know Fabric workspace XMLA Endpoint (aka Connection Link) follows the format powerbi://api.powerbi.com/v1.0/myorg/<workspace name> where Workspace name can...alfBI8 hours agoResponsive ResidentNew383Views4likes1Comment