Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
drbr
Helper II
Helper II

Dynamically highlight column IDs related to predefined scenarios (scenario slicer selection)

Goal: Using scenario slicer (A, B, C options), I'd like to dinamically highlight/mark (not filter out!!) rows on a table/matrix visual with DimTable data (ID, Title)

 

ScenarioTable

ScenarioColumn ID
A1
A3
B1
B2
B4
C2

 

DimTable

IDTitle
1Title 1
2Title 2
3Title 3
4Title 4

 

Thank you in advance,

drbr

1 ACCEPTED SOLUTION
camargos88
Community Champion
Community Champion

Hi @drbr ,

 

Does it work for you ?

Capture.PNG

 

Capture.PNG

 

If yes, check this file: Download PBIX 

 

 



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



View solution in original post

13 REPLIES 13
drbr
Helper II
Helper II

One suggestion/optimization to final solution @camargos88 provided:

 

_Measure =
VAR _scenario = SELECTEDVALUE(ScenarioTable[Scenario])
VAR _columnId = CALCULATETABLE(VALUES(ScenarioTable[Column ID]); FILTER(ScenarioTable; ScenarioTable[Scenario] = _scenario))
VAR _valueID = FILTER(DimTable; DimTable[ID] in _columnId)
RETURN IF(COUNTROWS(_valueID) = 1; 1; 0)
vanessafvg
Super User
Super User

are you using a slicer to filter?   

 

you can set your edit interactions do say how you want the visuals to interact between each other 

 

https://www.youtube.com/watch?v=KQsRHWTF4Bs





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Thank you. I am aware of this functionallity, yet it does not provide solution as, to my knowledge, table/matrix can only be cross-filtered and not cross-highlighted.

 

What I try to achieve is:

  • I select a scenario (slicer)
    • From the ScenarioTable I can see, which IDs should be highlited, if I select any of the A, B, C scenario
  • On a matrix visuaI I would not like to filter out scenario-matched IDs, only somehow highlight them

Scenario A selected: matrix visuals still displays all 4 IDs, but only ID 1 and 3 are highlighted.

Scenario B selected: matrix visuals still displays all 4 IDs, but only ID 1, 2 and 4 are highlighted.

Scenario C selected: matrix visuals still displays all 4 IDs, but only ID 2 is highlighted.

 

I guess for highlighting, I would have to use conditional formatting (visual interaction cross-highlighting is not available in matrix visual, only cross-filtering).

There are around 100 scenarios in my case.

 

Thank you,

drbr

are you able to provide some dummy data with a scenario or share your pbix





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




I've uploaded the file to Firefox Send: LINK

 

Thank you,

drbr

hi, unfortunately you are right there doesn't seem to be a way to do it, unless you employ the conditional formatting which as you say is a pain.

 

maybe this thread will help if you haven't seen it already.

 

https://community.powerbi.com/t5/Desktop/highlight-specific-rows-in-matrix/td-p/893600





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




you could also do something like this insead of using the matrix...

 

what are you after the total, the detail of the id's both?Capture.JPG





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Unfortunatelly the matrix is the only way to go.

Previously supplied link could work, but I have almost 100 scenarios.

 

I will keep the thread open if some DAX genius cracks it somehow😊

 

Thank you,

drbr 

also i see there is this idea on the ideas forum, maybe vote on it?

 

https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/18765976-cross-highlighting-with-...





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Voted😎

camargos88
Community Champion
Community Champion

Hi @drbr ,

 

Does it work for you ?

Capture.PNG

 

Capture.PNG

 

If yes, check this file: Download PBIX 

 

 



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Excellent. I've just came her to tell, I've manged to solve it myself and the I see this post😁. I practically did it in the same way as you. Such an approach can also work in various similar scenarios.

 

Well done, Sir!

 

Regards,

drbr

gotta buy that lotto ticket 🙂

 

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.