Forum Discussion
Dynamic Filter on Calculatetable (Doesn't Work)
- Anonymous2 years ago
HI Prihatama,
I think you can consider use IN operator, it can be used to compare value and list.
The IN operator in DAX - SQLBI
BTW, if you want to use large operator on the list, I think you only need to check the max one. If the current value large than the max value, it should also be suitable for the each of value in the list.
formula = VAR selected = VALUES ( QuantityTable[Quantity] ) VAR result = CALCULATE ( SUM ( QuantityTable[Quantity] ), FILTER ( ALLSELECTED ( QuantityTable ), QuantityTable[Quantity] >= MAXX ( selected, [Quantity] ) || QuantityTable[Quantity] IN selected ) ) RETURN resultRegards,
Xiaoxin Sheng
Prihatama
While creating a table or calculated column in Power BI, capturing slicer selections in real-time isn't feasible. Power BI constructs tables and columns before making them available on the report canvas. To assist you more effectively, kindly explain your requirements clearly, furnish sample data, and outline the expected outcome. This will enable a tailored solution to meet your specific needs. An approach using Measures should work in your case.
Based on your code I suggest you use a measure. Inside the measure you can create this particular table and use it as filters for the measure that you are calculating