Forum Discussion
Display selected hierarchy objects on a page
- 3 years ago
Hi lukaninda ,
Based on your description, I have created a simple sample:
Please try:
Level2 = SELECTEDVALUE('Table'[Level 2])Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi lukaninda ,
Based on your description, I have created a simple sample:
Please try:
Level2 = SELECTEDVALUE('Table'[Level 2])
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Thank you, Jianbo! This works excatly as I needed. I actually didn't expect there was such an easy solution. I have worked out my own, which is customized for my specific needs.
First, I created a measure that counts currently selected entities. The formula is simple:
entities_counter = COUNT('Table1'[Level 2])Then the same with clusters:
clusters_counter = COUNT('Table1'[Level 1])Second, I create a measure, which value depends on the counters:
entity_card = SWITCH(TRUE(),
'Table1'[entities_counter] > 1, "",
'Table1'[entities_counter] = 1, SELECTEDVALUE('Table1'[Level 2]),
BLANK())What I wanted from this measure is to show nothing ("") when 2 or more entities of Level 2 are currently selected.
Measure for clusters is almost the same except for it shows the name of the holding when 2 or more clusters are selected:
cluster_card = SWITCH(TRUE(),
'Table1'[clusters_counter] > 1, "Holding_name",
'Table1'[clusters_counter] = 1, SELECTEDVALUE('Table1'[Level 1]),
BLANK())I hope my solution will also be useful to someone.