Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Good day all,
I currently have a stacked bar chart with two products having the following annual sales:
Product | Year 1 | Year 2 | Year 3 |
A | 10 | 10 | 10 |
B | 10 | 20 | 30 |
I also have a slicer setup with values that allow me to filter out products with total sales over various thresholds (e.g >$5M, >$20M, etc).
When I select >$20M on the slicer, I see both products as single bars which makes sense as their totals are $30 and $60 respectively. However, when I bring in Year as a legend, the only bars visible in the chart are for Product B, Years 2 and 3 only. Is there a way to ignore the product size slicer when the Year legend is applied?
The measure I am using is: product sales = if( Calculate( [sales])>=Selectedvalue (productsize_slicervalue), Calculate ([sales]),Blank())
Thanks for your insights!
Solved! Go to Solution.
@madscientist , you can unpivot the date have a year in row
https://radacad.com/pivot-and-unpivot-with-power-bi
Hi @madscientist ,
Try to unpivot your table like:
And you measure will work.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
@madscientist , you can unpivot the date have a year in row
https://radacad.com/pivot-and-unpivot-with-power-bi
@amitchandakHi - in the underlyding dataset, year is already in a row via a calendar table (along with all other date-related attributes).
Hi @madscientist ,
Try to unpivot your table like:
And you measure will work.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
101 | |
66 | |
49 | |
39 | |
32 |
User | Count |
---|---|
166 | |
117 | |
61 | |
58 | |
42 |