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

How to Compare 2 Values

My dataset is set up as follows:

  • identifier
  • timeframe
  • metrics

The indentifier shows up multiple times in the table because there are multiple timeframes (i.e. 1 Week Ago, 2 Weeks Ago, etc.). This table is used to track changes in my metrics. For example, using this table we can see that last week there were 8 stores closed in zone 1, 2 weeks ago there were 10 stores closed, etc. 

swils516_0-1674078711595.png

I would like to buy a table/visual that will allow me to track the trends. Ideally, it would look like this:

swils516_1-1674078769063.png

I would like to utilize icons to idicate whether the metric has increased, decreased or remained the same from last week. 

The issue I am running into is that when I use Rules in the conditional formatting section, it will only allow me to make the comparison to a summarization of the data:

swils516_2-1674078852621.png

But when I change it from Field Value to rules, it does not allow me to select the column I want to compare it to. 

Can anyone make some suggestions about how to do this?

 

 

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

Hi @Anonymous 

You can use UNICHAR() function to realize it insteading of using incons in conditional conditional formatting.

e.g you can create three measure:

STOREUPPER = var a=MAXX(FILTER(ALLSELECTED('Table'),'Table'[Zone ID]=MAX([Zone ID])&&LEFT([Relative Week Description],1)+0=LEFT(MAX([Relative Week Description]),1)-1),[Store ])
return SWITCH(TRUE(),MAX([Store ])>a,UNICHAR(129049),MAX([Store ])<a,UNICHAR(129051),UNICHAR(129050))

ECLOUPPER = var a=MAXX(FILTER(ALLSELECTED('Table'),'Table'[Zone ID]=MAX([Zone ID])&&LEFT([Relative Week Description],1)+0=LEFT(MAX([Relative Week Description]),1)-1),[ECLO])
return SWITCH(TRUE(),MAX([ECLO])>a,UNICHAR(129049),MAX([ECLO])<a,UNICHAR(129051),UNICHAR(129050))

STOREUPPER = var a=MAXX(FILTER(ALLSELECTED('Table'),'Table'[Zone ID]=MAX([Zone ID])&&LEFT([Relative Week Description],1)+0=LEFT(MAX([Relative Week Description]),1)-1),[Store ])
return SWITCH(TRUE(),MAX([Store ])>a,UNICHAR(129049),MAX([Store ])<a,UNICHAR(129051),UNICHAR(129050))

and put them to table

vxinruzhumsft_0-1674098533866.png

 

You can refer to the following link to know more about the function:

DAX UNICHAR function in Power BI | Datapeaker

The following link is the related code of the icon:

Huge List of Unicode Character Symbols (vertex42.com)

 

Best Regards!

Yolo Zhu

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

View solution in original post

1 REPLY 1
v-xinruzhu-msft
Community Support
Community Support

Hi @Anonymous 

You can use UNICHAR() function to realize it insteading of using incons in conditional conditional formatting.

e.g you can create three measure:

STOREUPPER = var a=MAXX(FILTER(ALLSELECTED('Table'),'Table'[Zone ID]=MAX([Zone ID])&&LEFT([Relative Week Description],1)+0=LEFT(MAX([Relative Week Description]),1)-1),[Store ])
return SWITCH(TRUE(),MAX([Store ])>a,UNICHAR(129049),MAX([Store ])<a,UNICHAR(129051),UNICHAR(129050))

ECLOUPPER = var a=MAXX(FILTER(ALLSELECTED('Table'),'Table'[Zone ID]=MAX([Zone ID])&&LEFT([Relative Week Description],1)+0=LEFT(MAX([Relative Week Description]),1)-1),[ECLO])
return SWITCH(TRUE(),MAX([ECLO])>a,UNICHAR(129049),MAX([ECLO])<a,UNICHAR(129051),UNICHAR(129050))

STOREUPPER = var a=MAXX(FILTER(ALLSELECTED('Table'),'Table'[Zone ID]=MAX([Zone ID])&&LEFT([Relative Week Description],1)+0=LEFT(MAX([Relative Week Description]),1)-1),[Store ])
return SWITCH(TRUE(),MAX([Store ])>a,UNICHAR(129049),MAX([Store ])<a,UNICHAR(129051),UNICHAR(129050))

and put them to table

vxinruzhumsft_0-1674098533866.png

 

You can refer to the following link to know more about the function:

DAX UNICHAR function in Power BI | Datapeaker

The following link is the related code of the icon:

Huge List of Unicode Character Symbols (vertex42.com)

 

Best Regards!

Yolo Zhu

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

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.