Forum Discussion
olivierschelstr
5 years agoRegular Visitor
Bart graph with slicer?
Hi,
For a vegetable harvesting company I have to build a report showing the daily harvested volumes.
I have the following data:
- KG harvested per day
- Same as above but in Wooden Chests equivalent
I would like to have the bar graph below show either KG or Chests, depending on a slicer. How do I need to configure this in my visuals or data?
Thank you in advance,
olivierschelstr in this case, you can create a table with your slicer values like KG, Chests
then you create a measure like below which will based on the selection show the value in the chart
Data_type_Filter_value =IF(HASONEFILTER(Data_Type_Selected[Selection]),SWITCH(SELECTEDVALUE(Data_Type_Selected[Selection]),"KG", SUM('1_KG'),"Chests", SUM('2_Chests)),BLANK())
1 Reply
- negi007
Community Champion
olivierschelstr in this case, you can create a table with your slicer values like KG, Chests
then you create a measure like below which will based on the selection show the value in the chart
Data_type_Filter_value =IF(HASONEFILTER(Data_Type_Selected[Selection]),SWITCH(SELECTEDVALUE(Data_Type_Selected[Selection]),"KG", SUM('1_KG'),"Chests", SUM('2_Chests)),BLANK())