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
Allow Data View access for tables sourced from external semantic models
When using DirectQuery for Power BI datasets or semantic model chaining, developers can use remote tables in DAX, relationships, and report visuals, but cannot inspect the underlying rows in Data Vie...kent_lewan2 hours agoNew MemberNew2Views0likes0CommentsDouble cost of licensing for admin users for Fabric Capacity Metrics
For our organization we have specific user accounts for admin work and normal accounts for normal work. We do have an F65 capacity, and for me my normal user account is licensed so I can create. I ...AaronGross2 hours agoNew MemberNew1View0likes0CommentsRefresh SQL Analytics endpoint activity in Fabric pipelines not working when deploying
Hi all, I noticed that the Refresh SQL Analytics endpoint activity is not saving the workspace id so when trying to deploy the pipeline which is using this activity, the deployment failed since the ...adrianrivas075 hours agoNew MemberNew2Views0likes0CommentsAllow Programmatic Names for Renamed Fields in a Visual
I would like it if renamed fields in visuals could be set programmatically rather than having a fixed name. I work with reports in multiple languages and whilst you can add support for another langua...CoulterJames26 hours agoAdvocate IINew26Views7likes0Comments