Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Good Morning!
I am trying to create a table that shows the sales of Top N stores.
User selects N - via clicking on a value (e.g., 1, 3, 5, 10, ...) in a slicer / 1 col table i have created - SelectNumber[Select Number]
Below is my Dax - using SelectedValue does not work; if i give it a number like 3 or 4, it works. I also tried calculate Max - did not work either.
Please suggest.
Thanks!, Pavan
Hi @Anonymous ,
Would you mind sharing your sample data (with sensitive information removed) in a way that is not an image so that we can better help you?
How to provide sample data in the Power BI Forum
Hope it helps,
Community Support Team _ Caitlyn
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous SELECTEDVALUE will not work if you choose more than one item in the slicer. You could use MAX('SelectNumber'[SelectNumber]) instead.
Thanks Greg.
User can only select 1 value. I tried Max as well. Did not work.
Pic attached below.
@Anonymous , you need only TOPN stores?
Top 10 by duration = calculate(Sum(Table[Value]),TOPN(10,allselected(table[Store]),[Total Duration],DESC), values(table[Store]))
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Thanks Amit.
Table pic and slicer / user selection pic attached below.
User | Count |
---|---|
42 | |
26 | |
21 | |
16 | |
15 |
User | Count |
---|---|
54 | |
35 | |
18 | |
17 | |
15 |