Forum Discussion
sshikari
8 years agoRegular Visitor
Filtering before group by
I have data that needs to: 1. be filtered by date when pulled from the data source 2. grouped by 4 of the fields In my visualization, I want the user to be able to pick the date that filteres...
- 8 years agoThank you for the suggestions. After digging into this further I think my issue was that in power bi I had not grouped the data by the date. I thought that I could use the slicer to filter the data in a previous step (before the grouping) but it seems that the sliver affects the most recent state of the data. Including the date in the group by exposes it in the most recent state and now I can filter. Thanks for your help.
v-yuta-msft
8 years agoCommunity Support
Hi sshikari,
As a general solution based on your description, you can create a slicer and then create a measure on your table using DAX function like this pattern and check if it can work:
Result =
CALCULATE (
aggregation,
ALLEXCEPT (
Table,
Table[Column1],
Table[Column2],
Table[Column3],
Table[Column4]
),
Table[Date] = SELECTEDVALUE ( Table[Date] )
)
In addtion, you said "The goal in Power BI is to drive the "@meetingDate" variable from the Visualization section in Power BI (slicer?)"
<-- Could you please clarify more details about your requirment?
Best Regards,
Jimmy Tao
sshikari
8 years agoRegular Visitor
Thank you for the suggestions. After digging into this further I think my issue was that in power bi I had not grouped the data by the date. I thought that I could use the slicer to filter the data in a previous step (before the grouping) but it seems that the sliver affects the most recent state of the data. Including the date in the group by exposes it in the most recent state and now I can filter. Thanks for your help.