Forum Discussion
Help Needed!!! Selected Value not filtering??
- 7 years ago
Hi na12063
Why selected value not filtering in your original table is that calculated columns can't change with slicer.
I make some transform for your dataset, please see details in my pbix.
1. in Edit queries
select two columns and select unpivot columns, then close&&apply
2. in the data view
create a calculated column
Column = IF([Attribute]="Supp_Prom_Date", Switch ( TRUE(), OrderTable[Value]<= -5, "a.<=-5", OrderTable[Value] = -4, "b.-4", OrderTable[Value] = -3, "c.-3", OrderTable[Value] = -2, "d.-2", OrderTable[Value] = -1, "e.-1", OrderTable[Value] = 0, "f.0", OrderTable[Value] = 1, "g.1", OrderTable[Value] = 2, "h.2", OrderTable[Value] = 3, "i.3", OrderTable[Value] = 4, "j.4", OrderTable[Value]>= 5, "k.>=5" ) , SWITCH(TRUE(), OrderTable[Value]<= -5, "a.<=-5", OrderTable[Value] = -4, "b.-4", OrderTable[Value] = -3, "c.-3", OrderTable[Value] = -2, "d.-2", OrderTable[Value] = -1, "e.-1", OrderTable[Value] = 0, "f.0", OrderTable[Value] = 1, "g.1", OrderTable[Value] = 2, "h.2", OrderTable[Value] = 3, "i.3", OrderTable[Value] = 4, "j.4", OrderTable[Value]>= 5, "k.>=5" ) )3. create measures
Measure = SELECTEDVALUE(DataType[OTDDataType]) Measure 3 = SWITCH(MAX([OTDDataType]),"Our request Date","Our_Req_Date","Supplier Promise Date","Supp_Prom_Date") Measure 2 = IF([Measure 3]=MAX([Attribute]),1,0)
4 add [column] in the X-axis, [Attribute] in the Legend, [Index column] in the Value field, add Measure2 in the Visual level filter of the column chart and apply when value is 1 show items
Below is my pbix
Best Regards
Maggie
Hi Maggie,
I'm back with this case again this time I provided pbix file that you can check better what I'm trying to accomplish I hope you can solve this solution and I appriciate your contribution to this issue. Thanks
Here you can download the pbix file.
Regards,
Hi na12063
Why selected value not filtering in your original table is that calculated columns can't change with slicer.
I make some transform for your dataset, please see details in my pbix.
1. in Edit queries
select two columns and select unpivot columns, then close&&apply
2. in the data view
create a calculated column
Column =
IF([Attribute]="Supp_Prom_Date",
Switch (
TRUE(),
OrderTable[Value]<= -5, "a.<=-5",
OrderTable[Value] = -4, "b.-4",
OrderTable[Value] = -3, "c.-3",
OrderTable[Value] = -2, "d.-2",
OrderTable[Value] = -1, "e.-1",
OrderTable[Value] = 0, "f.0",
OrderTable[Value] = 1, "g.1",
OrderTable[Value] = 2, "h.2",
OrderTable[Value] = 3, "i.3",
OrderTable[Value] = 4, "j.4",
OrderTable[Value]>= 5, "k.>=5"
)
,
SWITCH(TRUE(),
OrderTable[Value]<= -5, "a.<=-5",
OrderTable[Value] = -4, "b.-4",
OrderTable[Value] = -3, "c.-3",
OrderTable[Value] = -2, "d.-2",
OrderTable[Value] = -1, "e.-1",
OrderTable[Value] = 0, "f.0",
OrderTable[Value] = 1, "g.1",
OrderTable[Value] = 2, "h.2",
OrderTable[Value] = 3, "i.3",
OrderTable[Value] = 4, "j.4",
OrderTable[Value]>= 5, "k.>=5"
)
)
3. create measures
Measure = SELECTEDVALUE(DataType[OTDDataType]) Measure 3 = SWITCH(MAX([OTDDataType]),"Our request Date","Our_Req_Date","Supplier Promise Date","Supp_Prom_Date") Measure 2 = IF([Measure 3]=MAX([Attribute]),1,0)
4 add [column] in the X-axis, [Attribute] in the Legend, [Index column] in the Value field, add Measure2 in the Visual level filter of the column chart and apply when value is 1 show items
Below is my pbix
Best Regards
Maggie
- na120637 years agoResolver I
Hi Maggie,
You are Awesome! I appriciate everything you did to solve this issue I had.
Thank You
Best Regards
na12063