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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
javierdhv
Frequent Visitor

Conditional formatting in table with measure and dates

Hi my name is Javier. It's my first post here but I have been checking the web every now and then for that, I really appreciate the work of the community.

 

This time my problem is with the conditional formatting in table with a measure. I would like to include an icon with a green, yellow and red arrow in case the week before is more, equal or less than the current week.

I have tried to do it as always, but I think the accumulate measure is making me a trouble. I have attached a link with a small replica of my data to check it. https://drive.google.com/open?id=1Octv7ogBSxFxQNcN8mZ3-AN9x7hDKwxR.

 

Thanks for all your answers in advanced.

1 ACCEPTED SOLUTION
v-deddai1-msft
Community Support
Community Support

Hi, 

 

Would you please follow the steps below?

 

Create a meausre to return a specific value of 0,1,2 to be used later to display the style and color of the icon:

 

Measure = IF([ad - # of ads week ago] > [AD - # of ads WoW],2,IF([ad - # of ads week ago] = [AD - # of ads WoW],0,1))

 

Add the measure to the table visualization and set the icon to display for it:

 

Untitled picture.png

 

Set rules for it as you want:

 

Untitled picture1.png

 

For more details, please refer to https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/EV-aF_BUAhJKrEecPa...

 

Best Regards,

Dedmon Dai

View solution in original post

3 REPLIES 3
v-deddai1-msft
Community Support
Community Support

Hi, 

 

Would you please follow the steps below?

 

Create a meausre to return a specific value of 0,1,2 to be used later to display the style and color of the icon:

 

Measure = IF([ad - # of ads week ago] > [AD - # of ads WoW],2,IF([ad - # of ads week ago] = [AD - # of ads WoW],0,1))

 

Add the measure to the table visualization and set the icon to display for it:

 

Untitled picture.png

 

Set rules for it as you want:

 

Untitled picture1.png

 

For more details, please refer to https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/EV-aF_BUAhJKrEecPa...

 

Best Regards,

Dedmon Dai

 Thanks. 😉

Stachu
Community Champion
Community Champion

the easiest way is to create a new measure like this:

 

 

Arrows = SIGN([AD - # of ads WoW]-[ad - # of ads week ago])

 

 

it returns -1,0 or 1 depending on whether the difference is negative, 0 or positive

then use it to set the conditional formattiing on  [AD - # of ads WoW]

Capture.PNG

it should now display as you expect



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.