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.
Hi,
I was trying to create a new table from another one dynamically from a filtered table taking only the top 2, but it is not working properly when the table is filtered because the formula TOPN is always taking the whole set of data instead of using the filtered subset.
Here the formula to calculate the top 2 from the related transport.
FilterTable -Top2 = TOPN(2; RELATEDTABLE(Transports);[Sort];ASC)
If I don't apply any filter, it is working properly because it is taking the whole dataset. But, when I select Peter, I would like to get the top 2 from the filtered subset (Boat, Airplane) and not the top 2 from the whole subset (Bike, Car).
Any idea or workaround in order to achieve the correct behavior?
Thanks.
@glaso-is,
Please check my DAX in the following PBIX file.
https://1drv.ms/u/s!AhsotbnGu1NokypOsLp_hVARMuxQ
Regards,
Lydia
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 |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |