Forum Discussion
Creating a line chart with a dynamic total line
- 5 years ago
Anonymous solution attached.
edhans , not sure if not having that function I'm missing anything. Never had a need for it but it can be surely handy.
Check my latest blog post Comparing Selected Client With Other Top N Clients | PeryTUS I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
edhans I hope this small video will help with the solution and here is the DAX code:
Selected Order =
VAR __values = VALUES ( 'Order'[Order] )
RETURN
"Selected Values -> " &
CONCATENATEX (
__values,
[Order],
", "
) &
" Total Count of selected values : " &
FORMAT (
COUNTROWS ( __values ),
"General Number"
)
- edhans5 years ago
Community Champion
Right parry2k - first of all thanks for jumping in with the follow up for Anonymous as I would have had to start over.
But my point was, and your video shows it, if you select 5 items, or 0 items, the measure shows 5 selected. Because VALUES(Table[Field]) shows the same with none or all of the items in the field are selected. That may or may not have any impact on this solution. It is just a frustrating thing. I am to sure how to detect none are selected, because DAX shows the same results as when all are selected. No distinction from the slicer's point of view. I know when you select none, it shows all, so treats it as all. Still. No COUNTCHECKBOXESINSLICER() function exists. 😀