Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I am creating a scatter plot between X and Y axis
On X axis slicer, we can select : Sales , GM , GM% , Sales%
On Y axis slicer, we can select : Sales , GM , GM% , Sales%
I have created a dynamic Measure using Switch function to get the desired result for the combination. Suppose we have selected GM in x axis and Sales % in Y axis. We will get the result based on that particular selections.
Issue :
Sales% and GM display unit will be in "General" format (Even if i put then as Auto in setting). I need them to be based on output of dynamic function. Like Sales% on Y axis should shown as %age's and GM on X axis in Thousands.
Please suggest , if thats possible in Power BI DAX
Solved! Go to Solution.
We can achieve dynamic formatting using Format in below way. This is working in Table but yes I am not able use this in Scatter chart. Might be a limitation of Scatter chart, needs to be explored further.
Y-axis Selection = switch(true, SELECTEDVALUE('Y axis'[Y Axis]) = "Sales", Format([T_Sales],"General Number"), SELECTEDVALUE('Y axis'[Y Axis])= "Sales %",Format([Sales%_PC],"Percent"))
Thanks
Ankit Jain
Do Mark it as solution if the response resolved your problem. Do like the response if it seems good and helpful.
Try using Format function in Power BI.
Thanks
Ankit Jain
Do Mark it as solution if the response resolved your problem. Do like the response if it seems good and helpful.
Thanks for quick response Ankit .
The solution you told , will convert those values to text and will not be displayed in scatter plot chart (Need is get display units in %age format).
I need the "display units" settings to show as percentage/ number based on output of the dynamci measure
measure Yaxis
Similarly i had made a for X axis selction too.
Hope i am clear , just wanted to check if there is any work around to that.
We can achieve dynamic formatting using Format in below way. This is working in Table but yes I am not able use this in Scatter chart. Might be a limitation of Scatter chart, needs to be explored further.
Y-axis Selection = switch(true, SELECTEDVALUE('Y axis'[Y Axis]) = "Sales", Format([T_Sales],"General Number"), SELECTEDVALUE('Y axis'[Y Axis])= "Sales %",Format([Sales%_PC],"Percent"))
Thanks
Ankit Jain
Do Mark it as solution if the response resolved your problem. Do like the response if it seems good and helpful.