Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hey,
I want to combine the ALL and FILTER function:
I want to count a string from product table without responding to the customer table .
My current idea:
Solved! Go to Solution.
Hi @PhiBu ,
Please use the following measure:
Measure =
CALCULATE (
CALCULATE (
COUNT ( 'Product_Table'[value] ),
FILTER ( 'Product_Table', 'Product_Table'[Product_Color] = "red" )
),
REMOVEFILTERS ( Customer_Data )
)
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
Hi, @PhiBu
I am not sure how your data model looks like, but I assume the measure is not considering the direction of a filter from customer_data table to product_table.
You may try to use Crossfilter function in your measure, or please share your sample pbix file's link, then I can try to have a look into it to come up with an accurate solution.
Thank you.
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: https://www.linkedin.com/in/jihwankim1975/
@PhiBu , this seems fine
Measure =
CALCULATE(
COUNT( 'Product_Table'[value] ),
FILTER('Product_Table', 'Product_Table'[Product_Color] = "red"),
removefilters(Customer_Data))
But you might end up getting data in one row
refer :https://www.linkedin.com/pulse/five-recent-power-bi-functions-you-should-use-more-often-amit-chandak
Hi @amitchandak,
thanks to your fast reply.
I also tried the remove filter function. However, it seems to be ignored. The Customer_Date Slicer in my report still affects the measure. If I dont use the filter "FILTER('Product_Table', 'Product_Table'[Product_Color] = "red")", the masuere will not be affected by the Customer_Date Slicer.
Is there something I am missing? Can I not combine All and Filter function?
Best regards!
Hi @PhiBu ,
Please use the following measure:
Measure =
CALCULATE (
CALCULATE (
COUNT ( 'Product_Table'[value] ),
FILTER ( 'Product_Table', 'Product_Table'[Product_Color] = "red" )
),
REMOVEFILTERS ( Customer_Data )
)
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
Thanks, using calculate two times was the point I missed!
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 53 | |
| 45 | |
| 44 | |
| 20 | |
| 19 |
| User | Count |
|---|---|
| 73 | |
| 71 | |
| 34 | |
| 33 | |
| 31 |