Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
I have a measure which is sum of Total Sales of few selected products which we hardcoded in measure by using IN operator.
Example:
I used below measure and it is working fine now in my case.
Sales=CALCULATE(SUM(Sales),Product[Product Name] in {"A","B","C"},Product[Product Name] in VALUES(Product[Product Name]))
Thanks.
@Ronak_1 , Try in one of the two ways
Sales=CALCULATE(SUM(Sales),filter(Product, Product[Product Name] in {"A","B","C"}) )
or
Sales=if(isfiltered(Product) , SUM(Sales),
CALCULATE(SUM(Sales),filter(Product, Product[Product Name] in {"A","B","C"}) ) )
User | Count |
---|---|
77 | |
74 | |
63 | |
61 | |
45 |
User | Count |
---|---|
108 | |
102 | |
93 | |
83 | |
64 |