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
Improve Relationship UI Wording to Better Reflect Filter Propagation Direction
The current relationship dialog can be confusing because the UI labels "From" and "To" do not always align with users' linguistic expectations regarding filter propagation. As per document : Relation...v-varunvv23 minutes agoMicrosoft EmployeeNew5Views1like0CommentsDynamic ADLS-Gen2 path input for Spark Jobs Main definition file
I would like the ability to add a dynamic input box on a spark job definition's "Main Definition File" "ADLS-Gen2 path". this would be useful to set base and variable paths across all spark jobs...mfink_db39 minutes agoNew MemberNew223Views2likes1CommentTenant and/or App/Workspace Banner messages- alerts
As a tenant admin - would like to publish banner messages or alerts as needed for the organization in the event of a data load failure, or other messaging that needs to be show to the end user on l...sue_yerly1 hour agoNew MemberNew378Views18likes3CommentsSlicer option to show no data when no value is selected
Hello Power BI Team, Description: Currently, when the "Select All" option is enabled in a slicer, selecting it displays all related values as expected. However, when "Select All" is de-selected and...7407544 hours agoNew MemberNew3Views0likes0CommentsParameterize Dataflow Gen2 data source connection
Allow the Dataflow Gen2 data source connection GUID to be parameterized and stored in a Variable Library. This would allow the same Dataflow to use different connections depending on the workspace/e...frithjof_v5 hours agoCommunity ChampionNew16Views1like0Comments