Forum Discussion
Dynamic Filtering
- 8 years ago
Apologies I didn't read the examples.
Is the Item code a load filter or a Slicer on all the data?
If a slicer then add a measure like this and Filter by the slicer for Item code and in the filter pane HasGV>0
HasGV = VAR GV = "GV100" RETURN CALCULATE ( COUNT ( Trans[Transaction Id] ), FILTER ( ALL ( Trans ), Trans[Transaction Id] = MAX ( Trans[Transaction Id] ) && Trans[Item Code] = GV ) ) - 8 years ago
Yeah the calc doesn't work for the order number but the whole table.
I tried a different tactic using a summary table. Here is another doc
https://1drv.ms/u/s!Aln7Q7AFJHneiW2FVW26L2xmf6OQ
Maybe this page will help use as it seems to solve a similar problem.
http://www.daxpatterns.com/basket-analysis/
Hi Sir,
Thank you for your guidance. May be i was not specific in my question on the earlier post.
I need to actually filter the table by a search criteria by Items, and the rsulting table should be with transaction ID's which have the specific "item" + " Gift Vouchers " in them.
Just getting the total of Gift vouchers issued is not the requirement.
Thanks in advance.
Prabunathan
Apologies I didn't read the examples.
Is the Item code a load filter or a Slicer on all the data?
If a slicer then add a measure like this and Filter by the slicer for Item code and in the filter pane HasGV>0
HasGV =
VAR GV = "GV100"
RETURN
CALCULATE (
COUNT ( Trans[Transaction Id] ),
FILTER (
ALL ( Trans ),
Trans[Transaction Id] = MAX ( Trans[Transaction Id] )
&& Trans[Item Code] = GV
)
)- Prabunathan8 years agoFrequent Visitor
Hi
Thank you and it works fantastic.
- stretcharm8 years agoMemorable Member
Great.
No problem.
- Prabunathan8 years agoFrequent Visitor
Hi Sir,
Apologies to trouble you again. Although i tried your solution on a sample work, I failed to apply your advice and lost in the DAX. I am not familiar with VAR, FILTERS in DAX.
It is difficult for me narrate my requirement, Hence i am sharing a sample Pbix which may help you to understand my requirement and correct my DAX measure syntax.
https://www.dropbox.com/s/ablz8s4681ospwt/Sample.pbix?dl=0
Appreciate your support.
Regards
Prabu