Forum Discussion
APEREZ2
4 years agoAdvocate I
Filter based on different columns depending on user selection
Good morning,
I want to create a report that detects everything affect a company like a IN OUT and show in a unique column.
I try to do this with a measure like that:
CALCULATE(count(Orders), filter(ALL(Data),Data[Company Recipient]=SELECTEDVALUE(DimCompany[Company]) || Data[Company Sender]=SELECTEDVALUE(DimCompany[Company]))))
The idea it's when someone press a filter on Company slicer and select one. The rest of information would be filtered and reflect the IN OUT orders.
In this case, I have a filter based on DimCompany that has a relation with Data[Company Recipient] and Data as Fact Table has all. The idea is to the interactions with the rest of filters works
Many thanks.
1 Reply
- amitchandakSuper User
APEREZ2 , Ideally you should use an independent company table for filter.
or try like
CALCULATE(count(Orders), filter(Data,Data[Company Recipient]=SELECTEDVALUE(DimCompany[Company]) || Data[Company Sender]=SELECTEDVALUE(DimCompany[Company])) , crossfilter(DimCompany[Company],Data[Company Recipient], none ))Need of an Independent Table in Power BI: https://youtu.be/lOEW-YUrAbE