Forum Discussion
problem with multiple selection in sumx
- Anonymous8 years ago
Please follow the link. It has the exact solution for you. I tried it on the pbix file you uploaded. It worked perfectly.
http://sqljason.com/2017/03/dynamic-grouping-in-power-bi-using-dax.html
If it works for you pleasse accept this as solution and also give KUDOS.
Cheers
CheenuSing
Hi LeandroCorrea,
I create sample table and try to reproduce your scenario. When the selection is unique, it still doesn't work. It only shows the selection value, the "Outros" is not shown as follows. If the slicer filter the x-axis, how to display "Outros"? There is related value in slicer. So please share your .pbix file for further analysis.
My measure is shown below.
mensure 2 = IF (FILTERS( table2[Cliente]) = FILTERS(Auxiliar2[Cliente]), SUMX (FILTER (Base, Base [Cliente] = FILTERS( Auxiliar2[Cliente])),Base[Valor]), IF (FILTERS( table2[Cliente]) = "Outros", SUMX (FILTER (Base, Base [Cliente] <> FILTERS(Auxiliar2[Cliente])), Base[Valor])))
And when the selection is multiple, there will be some values compared to some values in this part: FILTERS( table2[Cliente]) = FILTERS(Auxiliar2[Cliente]), the logic is wrong. So it didn't work correctly.
In addition, please use the following formula and check if it works fine.
Measure =
IF (
SELECTEDVALUE ( Auxiliar2[Cliente] ) <> "Outros",
SUMX (
FILTER ( Base, Base[Cliente] = FILTERS ( Auxiliar2[Cliente] ) ),
Base[Valor]
),
SUMX (
FILTER ( Base, Base[Cliente] <> FILTERS ( Auxiliar2[Cliente] ) ),
Base[Valor]
)
)
Best Regards,
Angelia
- LeandroCorrea8 years agoFrequent Visitor
how do I share the pbix file here?
Is there somewhere here on the page to attach or only by external link?- v-huizhn-msft8 years agoMicrosoft Employee
Hi LeandroCorrea,
You can upload the .pbix file as attachments as follows.
Or you can store your .pbix file in onedrive, and post the share link.
Best Regards,
Angelia- LeandroCorrea8 years agoFrequent Visitor
follows the file, as I had said, with simple selection works perfectly. It brings the selected customer into one column and groups the other clients into the "other" column of the chart. I need to select two clients, example (D and C) and the graph presents these three columns (D, C and one of Others)