Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I need get Top N value from Slicer, but some slicer value is +, some slicer is -, when slicer is +, I will choose TopN, when slicer is -, I will choose bottom N, here is my DAX :
TopN =
var TopProductDesc = TOPN(25, ALLSELECTED('Ultimate'[Credit Ultimate]), [DateSale], DESC)
var TopProductAsc = TOPN(25, ALLSELECTED('Ultimate'[Credit Ultimate]), [DateSale], ASC)
var AscorDesc = SELECTEDVALUE('Measure'[Measure]) IN {"A","B","C","D"}
var TopProduct = IF ( AscorDesc , TopProductDesc, TopProductAsc)
RETURN
TopProduct
error message is :
The True/False expression does not specify a column, Each True/False expression used as a table filter expression must refer to exactly one column.
If I want according measure decide TopN desc or TopN asc, How to modify my DAX, Thank you for help
It looks like you're trying to create a calculated table. However, calculated tables cannot be responsive to slicers since they are only calculated once per time the data model is loaded, not in response to filtering in the report.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |