The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi all!
I've a scatter plot that shows the revisions of the items table. I've also two filters: one for the revisions of the facilities table (open) and one for the revisions of the items table (closed).
When I select the open ones, the corresponding points on the chart should be red, while when I select the closed ones, the corresponding points should be blue. How can I do this? Facility and items are not directly connected to each other but are both related to a fact table.
Thanks!
Hi @Fern_21,
Thank you for reaching out to the Microsoft fabric community forum.
Has your issue been resolved? If the response provided by the community member @burakkaragoz, addressed your query, could you please confirm? It helps us ensure that the solutions provided are effective and beneficial for everyone.
Also, kindly refer to the below mentioned link for better understanding:
Apply Conditional Table Formatting in Power BI - Power BI | Microsoft Learn
Hope this helps clarify things and let me know what you find after giving these steps a try happy to help you investigate this further.
Thank you for using the Microsoft Community Forum.
Hi @Fern_21,
Just checking in to see if the issue has been resolved on your end. If the earlier suggestions helped, that’s great to hear! And if you’re still facing challenges, feel free to share more details happy to assist further.
Thank you.
Hi @Fern_21 ,
You need to create a dynamic color measure that checks which filter is active and returns the appropriate color.
Create this measure:
Scatter Point Color = VAR FacilityFilterActive = NOT(ISFILTERED('Facilities'[Revision])) || ISBLANK(SELECTEDVALUE('Facilities'[Revision])) VAR ItemFilterActive = NOT(ISFILTERED('Items'[Revision])) || ISBLANK(SELECTEDVALUE('Items'[Revision])) VAR FacilitySelection = SELECTEDVALUE('Facilities'[Revision]) VAR ItemSelection = SELECTEDVALUE('Items'[Revision]) RETURN SWITCH( TRUE(), NOT(FacilityFilterActive) && FacilitySelection = "Open", "Red", NOT(ItemFilterActive) && ItemSelection = "Closed", "Blue", "Gray" // Default color when no specific filter is applied )
Alternative approach if the above doesn't work:
Dynamic Color = VAR HasFacilityFilter = HASONEVALUE('Facilities'[Revision]) VAR HasItemFilter = HASONEVALUE('Items'[Revision]) VAR FacilityValue = IF(HasFacilityFilter, VALUES('Facilities'[Revision]), BLANK()) VAR ItemValue = IF(HasItemFilter, VALUES('Items'[Revision]), BLANK()) RETURN CASE( FacilityValue = "Open", "Red", ItemValue = "Closed", "Blue", "Gray" )
How to apply it:
If Legend approach doesn't work: Try putting the measure in a conditional formatting setup:
The key is that the measure needs to detect which slicer is active and return the appropriate color based on the relationship through your fact table.
If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.
This response was assisted by AI for translation and formatting purposes.
User | Count |
---|---|
79 | |
78 | |
37 | |
33 | |
31 |
User | Count |
---|---|
93 | |
81 | |
59 | |
49 | |
49 |