Forum Discussion
Calculate value based on slicer
- Anonymous9 years ago
MiKeZZa wrote:
Yes, I want exactly what you describe but then without placing a filter in the visual....
So I want every new added visual directly to lack the data that is filtered out in the visual with CustCount > 0 to prevent making mistakes by using the original measure's (I won't hide them)
Hi MiKeZZa,
The method I can think out is to drag the CustCount to "Report level Filters" and set the value of it to be greater than 0.
Thanks,
Lydia Zhang
I've now made these Measures:
- CustCountFiltered
CustCountFiltered = CALCULATE(DISTINCTCOUNT(Table_ProductionNumber[CustomerID]), FILTER(TableProductionNumber, TableProductionNumber[User_Email]="[email protected]"))
- CustCountNotFiltered:
DistinctCount(Table_productionNumber[CustomerID])
- CustCount
if(max(ShowOnlyDepartment_Slicer[OnlyOwnDepartment])="Yes",[CustCountFiltered],[CustCountNotFiltered])
This works well for now! The onliest thing is that I have to make something for the hardcoded mailadress. In PowerBI Desktop USERPRINCIPALNAME() doesn't work; the filtered values are empty then. But I'll give it a try after publishing.
This all works fine. So I'm happy now. But the onliest thing I'm interested now is if there is a possiblity to automatically filter the whole dataset. This because of that I now have to filter a table with CustCount > 0.
Hi MiKeZZa,
Could you please describe more details about automatically filtering the whole dataset? We will appreciate that if you can share sample data of your tables and post expected result here.
If you want to filter data with “CustCount>0”, just drag the measure to the visual level filter of your table visual and set the value of the measure to be greater than 0.
Thanks,
Lydia Zhang
- MiKeZZa9 years ago
Post Patron
Yes, I want exactly what you describe but then without placing a filter in the visual....
So I want every new added visual directly to lack the data that is filtered out in the visual with CustCount > 0 to prevent making mistakes by using the original measure's (I won't hide them)
- Anonymous9 years agoNot applicable
MiKeZZa wrote:
Yes, I want exactly what you describe but then without placing a filter in the visual....
So I want every new added visual directly to lack the data that is filtered out in the visual with CustCount > 0 to prevent making mistakes by using the original measure's (I won't hide them)
Hi MiKeZZa,
The method I can think out is to drag the CustCount to "Report level Filters" and set the value of it to be greater than 0.
Thanks,
Lydia Zhang