Forum Discussion
Bar Chart Filter and X Axis Column Selection
- 1 year ago
Hi Settz -Create a Parameter Table
eg: DateParam =
DATATABLE(
"Date Type", STRING,
{
{"Order Date"},
{"Delivery Date"}
}
)Now, create a measure that dynamically filters the data based on the selected date type and only includes rows in the reporting window.
ShowQty :=
VAR SelectedDateType = SELECTEDVALUE(DateParam[Date Type])
RETURN
CALCULATE(
SUM(Orders[Qty]),
FILTER(
Orders,
(SelectedDateType = "Order Date" && Orders[In Entry Window] = 1) ||
(SelectedDateType = "Delivery Date" && Orders[In Deliv Window] = 1)
)
)Create a calculated column or use a measure to switch the date used on the X-axis
SelectedDate :=
SWITCH(
SELECTEDVALUE(DateParam[Date Type]),
"Order Date", Orders[Order Date],
"Delivery Date", Orders[Delivery Date]
)you will need to create a disconnected calculated table or duplicate your date field and then filter it accordingly in your visual. Hope this works. please check
Hi Settz ,
Just wanted to check if you had the opportunity to review the suggestion provided?
If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.
- Anonymous1 year agoNot applicable
Hi Settz ,
Just wanted to check if you had the opportunity to review the suggestion provided?
If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.
- Anonymous1 year agoNot applicable
Hi Settz
Just wanted to check if you had the opportunity to review the suggestion provided?If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.