Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
I have created a calculated column:
Category Sales Bin = (IF(Orders[Sale%]>0 && Orders[Sale%]<=0.06, "0% - 6%",
IF(Orders[Sale%]>0.06 && Orders[Sale%]<=0.14,"7% - 14%",
IF(Orders[Sale%]>0.14 && Orders[Sale%]<=0.21,"14% - 21%",
IF(Orders[Sale%]>0.21,"> 21%" )))))
sale% is also a calcualted column which is calculating percentage and is in decimal format.
Now Category Sales Bin is showing "0% - 6%" for all the values
For 13.01 or 12.68 it is showing "0% - 6%".
Why it is showing for all same value .
also i want to use this bin in bar chart and study sale% distribution bin wise
Power Bi File- Link
Solved! Go to Solution.
Looking at the pbix, I think you already know the answer. The Sales% in the table visual is an aggregation of the numeric column but the Category Sales Bin 3 is a text field which is not going to aggregate.
Sales% summed actually does make sense in the data but we have to be very careful adding up percentages normally.
One solution is to create SUM(sales%) as a measure and create the bucket calculation as a measure which refers to it. I think you would have to use a variable to store the SUM(sales%) and then use that variable in the rest of the measure. Don't overcomplicate it.
You will need Product SubCategory in the visual to provide the correct context
Good luck.
Hi @Anonymous ,
The cause is just like what @HotChilli said.
Please create a Measure like so:
Category Sales Bin =
VAR Sum_Sales =
SUM ( Orders[Sale%] )
RETURN
(
IF (
Sum_Sales > 0
&& Sum_Sales <= 0.06,
"0% - 6%",
IF (
Sum_Sales > 0.06
&& Sum_Sales <= 0.14,
"7% - 14%",
IF (
Sum_Sales > 0.14
&& Sum_Sales <= 0.21,
"14% - 21%",
IF ( Sum_Sales > 0.21, "> 21%" )
)
)
)
)
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
The cause is just like what @HotChilli said.
Please create a Measure like so:
Category Sales Bin =
VAR Sum_Sales =
SUM ( Orders[Sale%] )
RETURN
(
IF (
Sum_Sales > 0
&& Sum_Sales <= 0.06,
"0% - 6%",
IF (
Sum_Sales > 0.06
&& Sum_Sales <= 0.14,
"7% - 14%",
IF (
Sum_Sales > 0.14
&& Sum_Sales <= 0.21,
"14% - 21%",
IF ( Sum_Sales > 0.21, "> 21%" )
)
)
)
)
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , Please refer to my Video and the file attached after signature if those can help
Looking at the pbix, I think you already know the answer. The Sales% in the table visual is an aggregation of the numeric column but the Category Sales Bin 3 is a text field which is not going to aggregate.
Sales% summed actually does make sense in the data but we have to be very careful adding up percentages normally.
One solution is to create SUM(sales%) as a measure and create the bucket calculation as a measure which refers to it. I think you would have to use a variable to store the SUM(sales%) and then use that variable in the rest of the measure. Don't overcomplicate it.
You will need Product SubCategory in the visual to provide the correct context
Good luck.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
78 | |
76 | |
53 | |
37 | |
31 |
User | Count |
---|---|
101 | |
56 | |
51 | |
45 | |
40 |