Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hello, everyone!
I create dashboards based on financial information of a group of companies. There is a two level organizational hierarchy - let's say Level 1 and Level 2. Sample structure looks like this:
Cluster 1 (Level 1) includes entities A, B, C (Level 2)
Cluster 2 (Level 1) includes entities X, Y, Z (Level 2)
There are slicers on my dashboards which allow users to navigate through this hierarchy and see information they need. My task is to show on the report page which entity is currently selected via slicer. I solved it by adding cards. It works perfectly when a separate entity is selected. However, when I want to see aggregated cluster-level data, entities are also displayed (it's obvious because all entities in a cluster are being selected). Is there any solution to not show any output when whole clusters are selected?
What I managed to do:
Slicer: entity B of cluster 1 is selected
Card 1: Cluster 1
Card 2: Entity B
Desired result:
Slicer: cluster 1 is selected
Card 1: Cluster 1
Card 2: empty
I would appreciate any help with alternative solutions, if this is unrealizable through cards.
Solved! Go to Solution.
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.
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
136 | |
117 | |
101 | |
71 | |
61 |