Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hi,
I have a 6 different measure and want to use all of them on rankx with slicer. aim is creating a slicer with names of measures first then using selectedvalue and show top 10 figures on table.
I have created a table as figures and added measure names in to cells.
then created below dax but receiving error as "Special flag is not allowed as an argument number 3 of function 'RANKX'"
Top_10_Rating =
Var
Selected=IF(SELECTEDVALUE(Figures[Figures])="aaa",[aaa],
IF(SELECTEDVALUE(Figures[Figures])="bbb",[bbb],
IF(SELECTEDVALUE(Figures[Figures])="ccc",[ccc],
IF(SELECTEDVALUE(Figures[Figures])="ddd",[ddd],
IF(SELECTEDVALUE(Figures[Figures])="eee",[eee],
IF(SELECTEDVALUE(Figures[Figures])="fff",[fff],BLANK()))))))
Var
mrank=RANKX(ALL(Table[Name]), Selected,desc)
return
IF(mrank<=10, Selected,BLANK())
Solved! Go to Solution.
@selpaqm ,
Top_10_Rating =
Var
Selected=IF(SELECTEDVALUE(Figures[Figures])="aaa",[aaa],
IF(SELECTEDVALUE(Figures[Figures])="bbb",[bbb],
IF(SELECTEDVALUE(Figures[Figures])="ccc",[ccc],
IF(SELECTEDVALUE(Figures[Figures])="ddd",[ddd],
IF(SELECTEDVALUE(Figures[Figures])="eee",[eee],
IF(SELECTEDVALUE(Figures[Figures])="fff",[fff],BLANK()))))))
Var
mrank=RANKX(ALL(Table[Name]), Selected,,desc)
return
IF(mrank<=10, Selected,BLANK())
One addition is required.
Also, my advice would create rank measures and then select then based on selection.
in place [aaa] use Rank on aaa in the formula
@selpaqm ,
Top_10_Rating =
Var
Selected=IF(SELECTEDVALUE(Figures[Figures])="aaa",[aaa],
IF(SELECTEDVALUE(Figures[Figures])="bbb",[bbb],
IF(SELECTEDVALUE(Figures[Figures])="ccc",[ccc],
IF(SELECTEDVALUE(Figures[Figures])="ddd",[ddd],
IF(SELECTEDVALUE(Figures[Figures])="eee",[eee],
IF(SELECTEDVALUE(Figures[Figures])="fff",[fff],BLANK()))))))
Var
mrank=RANKX(ALL(Table[Name]), Selected,,desc)
return
IF(mrank<=10, Selected,BLANK())
One addition is required.
Also, my advice would create rank measures and then select then based on selection.
in place [aaa] use Rank on aaa in the formula
@amitchandak can you give me an example becuase table gone crazy waiting ages to monitor one figure.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 52 | |
| 37 | |
| 35 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 73 | |
| 70 | |
| 39 | |
| 34 | |
| 23 |