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
iamkhwan
Employee
Employee

How to show the Conditional Formatting option in Fields tab

 

Hi All, 

I'm a newbie in the PowerBI world and I'm creating a custom visual app that needs to show the conditional formatting option as the Matrix visual does in a Values in the Fields tab.

 

iamkhwan_2-1617098283135.png -> iamkhwan_1-1617098220373.png


Currently, I can show the conditional formatting (Fx) in the Format tab only via adding the capabilities.json like the image below.

iamkhwan_4-1617098452791.png  iamkhwan_5-1617098657138.png

After that, I add the dataViewWildcard in enumerateObjectInstances method in visual.ts file.

iamkhwan_6-1617098744491.png


Have anyone bring the conditional formatting (Fx) in Values in the Fields tab? 

Thank you so much.

Regards,

Puttarak

 

6 REPLIES 6
saikirann
Frequent Visitor

Hello @iamkhwan , Did you get any solution to this problem ? 
I am having similar issue 
https://community.powerbi.com/t5/Developer/Custom-visuals-How-to-access-colors-set-in-Conditional/m-...

Hi @saikirann, Sorry for late reply. Due, Conditional Formatting doesn't work with Matrix & Table in api v.3.6 (https://docs.microsoft.com/en-us/power-bi/developer/visuals/conditional-format). As i researched Conditional Formatting work great with categorical type. Then, I changed my dataViewMapping to Categorical type instead of Matrix type and build Matrix object by manually. 

By this way, It will return data from rule that set in Conditional Formatting menu 🙂

dm-p
Super User
Super User

Hi @iamkhwan,

Conditional formatting (which has only just been made available in API v3.5) only supports the properties pane, i.e. how you've currently got it to work. If you want data role support, I'd suggest creating an issue in the GitHub repository for the team to take a look at adding it in.

Regards,

Daniel





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

Proud to be a Super User!


My course: Introduction to Developing Power BI Visuals


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




Hi @dm-p, Thank you for your information about the Conditional formatting in data role :).

Regards,
Puttarak Boonyatham

V-lianl-msft
Community Support
Community Support

Hi @iamkhwan ,

 

See if this can help you:

https://github.com/Microsoft/PowerBI-visuals-tools/blob/main/templates/visuals/.api/v1.9.0/PowerBI-v... 

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

@V-lianl-msft Thank you so much for your reply. Currently, i use API v3.6 and there is no document for this version in PowerBI-visuals-tools/templates/visuals/.api at main · microsoft/PowerBI-visuals-tools · GitHub

Best regards,
Puttarak Boonyatham

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.