Forum Discussion
Hide stacked row when below threshold
Hi,
In the charts below I am willing to hide the row when the row value goes below 50.
For the right hand chart, I can do it by using measure in this format:
But how do I achieve that on the left side chart (stacked bar chart) ?
The same principle does not work, and I think the condition "[measure] > threshold" evaluates it after breaking it down + stacking it down.
So I get the charts below when I use such calculation:
Thanks.
Hi Anonymous to get the desired result you need to use measures to break down the stacked.
For example, in my data set, I have a sales.
So the measures will be :
Total sales (K/$) = SUMX('orders',('orders'[Unit price]- [Discount])*'orders'[Quantity])total sales LY = CALCULATE([total_sales],SAMEPERIODLASTYEAR('Calendar'[Date]))Result before filtering :The result after filtering sales greater than 200,000
pbix is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
3 Replies
- Ritaf1983Super User
Hi Anonymous to get the desired result you need to use measures to break down the stacked.
For example, in my data set, I have a sales.
So the measures will be :
Total sales (K/$) = SUMX('orders',('orders'[Unit price]- [Discount])*'orders'[Quantity])total sales LY = CALCULATE([total_sales],SAMEPERIODLASTYEAR('Calendar'[Date]))Result before filtering :The result after filtering sales greater than 200,000
pbix is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
- AnonymousNot applicable
Thanks Ritaf1983
I checked your pbix.
I can see you have two segments in the stacked chart, but in my case the measure is stacked by a dimension. When I apply the same principle in your pbix, unfortunately it does not work 😞
I think when stacked by, it considers the part of the bar to meet the condition set.- Ritaf1983Super User
Hi Anonymous
As I mentioned that is possible only if you will create separate measures...This is how the engine works, you can't filter a "part of the measure"
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly