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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Tab colour not shown when new column added

Hi all,

 

I have 2 questions.

I currently have my data conditionally formatted to turn red if the value is more than 5% as shown below and it works perfectly.

amelynatwork_0-1599618065583.png

I use the following:

Background Colour = SWITCH(true(),'Cable Schedule'[% Volt Drop]>=0.05,"red")
My current table visualisation shows data from Cable Schedule and datasheet and Bridge Table.
1) However, when I add a new column from loadlist, all my conditional formatting no longer works. How can I fix this?

 

Picture1.png
 

 

2) I added a column to Datasheet and would like to use it compare to a column in loadlist where is one is more than the other, the tab will turn red. 

 

I used the following:

Background Colour = SWITCH(true(),RELATED('Datasheet'[New column]<'loadlist'[calculated],"red")) and I get the error message. 
"Too many arguments were passed to the RELATED function. The maximum argument count for the function is 1." It is also unable to "refernce to 'Datasheet'[New Column] as that text is greyed out. 
 
Thank you in advanced for your help.
15 REPLIES 15
Greg_Deckler
Super User
Super User

@Anonymous 

One, it should be this:

Background Colour = SWITCH(true(),RELATED('Datasheet'[New column])<'loadlist'[calculated],"red")

Two, for this to work, you will need to change your relationship direction to Both 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler 

 

I got the error message below even after making the changes.

"The column 'Datasheet[New Column]' either doesn't exist or doesn't have a relationship to any table available in the current context."

@Anonymous - Where are you creating this column? Which table?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler 

 

Apologies I am creating this new column in loadlist to conditionaly format one of the columns in load list.

 

Thank you

Anonymous
Not applicable

@Greg_Deckler 

 

I am creating this new column in the 'Cable Datasheet' table.

@Anonymous  Oh, then it is the reference to loadlist causing the problem, you would need to change the relationship direction between bridge table and load list to be Both


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler 

 

I have changed the relationships to the following 

Picture1.png

and I still get the following error message:

"The column 'Datasheet[Derated Current]' either doesn't exist or doesn't have a relationship to any table available in the current context."

 

amelynatwork_0-1599622697441.png

 

 

@Anonymous - OK, never liked RELATED anyway. Try 

MAXX(RELATEDTABLE('Datasheet'),[Derated Current])

instead of RELATED. 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler 

 

Great! That works thank you.

But I still can't seem to fix my first issue.

I currently have my data conditionally formatted to turn red if the value is more than 5% as shown below and it works perfectly.

amelynatwork_0-1599628117385.png

 

I use the following in Cable Schedule:

Background Colour = SWITCH(true(),'Cable Schedule'[% Volt Drop]>=0.05,"red")
My current table visualisation shows data from Cable Schedule and datasheet and Bridge Table.

However, when I add a new column from loadlist, all my conditional formatting no longer works. How can I fix this?

Hi @Anonymous ,

Based on your description, I have created a sample as your picture shows, but when I add columns from loadlist table into the table visual, the conditional format still works fine.

beforebeforeafterafter

Maybe you can consider sharing a dummy file for further discussion or modify my sample file which is attached in the below, that could help you better to solve this issue.

 

Best Regards,
Yingjie Li

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

Anonymous
Not applicable

@v-yingjl 

 

I tried to upload my pbix file but i am unable to.

However, I removed and deleted sensitive data and the formatting came back (really not sure why I cant seem to fix it in my actual file. What is the reason this usually happens?)

But my values appear repeated over and over again.

amelynatwork_0-1599804045422.png

 

Hi @Anonymous ,

It seems that the issue could not be determined based on the current table screenshot alone. If you cannot upload the dummy file to the community, you can try to upload it to where can store files such as OneDrive for Business etc. and share the file link here for further discussion.

 

Best Regards,
Yingjie Li

amitchandak
Super User
Super User

@Anonymous ,

Try like

SWITCH(true(),RELATED('Datasheet'[New column])<'loadlist'[calculated],"red")

Anonymous
Not applicable

@amitchandak 

 

I now get this error message "The column 'Datasheet[Derated Current]' either doesn't exist or doesn't have a relationship to any table available in the current context."

@Anonymous , related will only work from 1-M side

you can bring like this

 

//from Geography to Sales

City Name = maxx(FILTER(geography,geography[City Id]=Sales[City Id]),geography[City])

//From Sales to Geography 

City Name = Sumx(FILTER(Sales,geography[City Id]=Sales[City Id]),Sales[Amount])

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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