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.
- SohailAdvocate IVMust have Regards sohail
- HansMostafaviAdvocate I100% 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
Individual L/R column borders for Matrix
Add Power BI feature for applying left and/or right borders to individual matrix columns, with customizable border thickness and color. This would let users visually group related measures, highlight...AaronReasoner2 hours agoNew MemberNew1View0likes0CommentsSupport Git-Integrated Files in Fabric Workspaces
Overview Allow users to store and manage arbitrary files such as .md, .sql, .py, and .yml directly in a Fabric workspace, with built-in Git integration. Value This would keep documentation, SQL sc...ryomaru08257 hours agoAdvocate INew32Views4likes1CommentConsistent Locale Handling Across Power BI, Fabric, PowerPoint, and Subscriptions
Microsoft Fabric and Power BI should provide consistent locale handling across all user experiences. Today, locales such as German (Switzerland) are correctly respected in Power BI Desktop and the Po...Le_M8 hours agoRegular VisitorNew22Views1like0CommentsIn Data Pipelines, Schedules should not be part of the definition
The request is to ensure Schedules are not included in the definition of a Data Pipeline for purposes of Deployment Pipelines. Today, when we deploy content across environments, the item frequent...schneiw9 hours agoAdvocate IVUnder Review813Views25likes3CommentsPipeline activity Refresh SQL Endpoint (preview) does not accept dynamic content
I am testing out the new Pipeline activity for Refresh SQL Endpoint, currently in preview. Sure, I get it that this is in preview, but it should at least have basic minimum functionality. It do...ToddChitt9 hours agoSuper UserNew591Views8likes6Comments