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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
Anonymous
Not applicable

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 @Anonymous, 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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.