Forum Discussion
casperlow
Helper I
2 years agoDax Sum Unique ID values ones
Hi Dax Guru's How do I perform a dax measure to calculate the sum of the cost ones for each unique ID. My current Dax formula: Total Cost = sum(cost) but the output is 1100 which is incorrect. The...
casperlow
Helper I
2 years agoIt doesn't work when I tried this Dax on creating a measure, the error im gettings is "The end of the input was reached."
I had to tweak it a little for it to make it work on my table, I had to add a filter but overall the dax formula works. 🙂 thank you
Irwan
Super User
2 years agohello casperlow
is this what you are looking for?
create a new measure with following DAX.
Total Sum =
var _Cat = SELECTEDVALUE('Table'[Category])
Return
SUMX(
FILTER(
ALLSELECTED('Table'),
'Table'[Category]=_Cat
),
'Table'[Unit]
)
however, if you dont put a selection in slicer, it will become blank.
While put them into table will show all the value.
Hope this will help.
Thank you.