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
Native Multi-Visual Cascading Selection (Beyond Ctrl + Click)
The Problem: When working with multiple tables or matrices on a report page, users frequently need to chain selections together (e.g., clicking Matrix A filters Matrix B, and then clicking Matrix B ...74075453 minutes agoNew MemberNew3Views0likes0CommentsMake Multi-Column Sorting Discoverable in the UI (Beyond Shift+Click)
The Problem: While Power BI technically supports multi-column sorting in Table and Matrix visuals via the Shift + Click keyboard shortcut, this functionality is completely hidden from standard busin...7407541 hour agoNew MemberNew3Views0likes0CommentsAllow dynamic content in Activity Name (and other fields on general tab)
We copy a large number of tables by iterating through a ForEach activity and calling the copy activity for each. When trying to answer "which tables take a long time to copy", it's hard because all...Scott_Powell15 hours agoNew MemberNeeds Votes3.6KViews18likes3CommentsPower BI REST + PowerShell parity without Tenant Admin
Summary Item‑level APIs/cmdlets so engineers can automate what the UI can do without requiring Tenant Admin scopes. Problem Key actions (e.g., sensitivity labels) are admin‑only via REST; other...wbc_gr5 hours agoNew MemberNew192Views5likes1Comment